mirror of https://github.com/caronc/apprise
Updated Troubleshooting (markdown)
parent
e9193d15d4
commit
3e281ee2b7
|
@ -8,6 +8,9 @@
|
||||||
* [Special Characters and URL Conflicts](#special-characters-and-url-conflicts)
|
* [Special Characters and URL Conflicts](#special-characters-and-url-conflicts)
|
||||||
* [Formatting Issues](#formatting-issues)
|
* [Formatting Issues](#formatting-issues)
|
||||||
* [PyInstaller Support](#pyinstaller-support)
|
* [PyInstaller Support](#pyinstaller-support)
|
||||||
|
* [General Exceptions and/or Messages](#general-exceptions-andor-messages)
|
||||||
|
* [RuntimeError: asyncio.run() cannot be called from a running event loop
|
||||||
|
](https://github.com/caronc/apprise/wiki/Troubleshooting/_edit#runtimeerror-asynciorun-cannot-be-called-from-a-running-event-loop)
|
||||||
<!--te-->
|
<!--te-->
|
||||||
|
|
||||||
## General Troubleshooting
|
## General Troubleshooting
|
||||||
|
@ -233,3 +236,21 @@ pyinstaller -F --collect-all apprise myscript.py
|
||||||
|
|
||||||
No more errors, notifications are sent.
|
No more errors, notifications are sent.
|
||||||
|
|
||||||
|
## General Exceptions and/or Messages
|
||||||
|
|
||||||
|
### RuntimeError: asyncio.run() cannot be called from a running event loop
|
||||||
|
If your calling program runs it's own event loop, then Apprise can cause some commotion when it tries to work with it's own. For these circumstances you have 2 options.
|
||||||
|
1. Do not call `notify()`. Instead `await` the `async_notify()` call itself. [See here for more details](https://github.com/caronc/apprise/wiki/Development_API#async_notify--leveraging-await-to-send-notifications).
|
||||||
|
1. Leverage a library that handles this exact case called [nest-asyncio](https://pypi.org/project/nest-asyncio/):
|
||||||
|
```bash
|
||||||
|
pip install nest-asyncio
|
||||||
|
```
|
||||||
|
Then from within your python application just import it at the top:
|
||||||
|
```python
|
||||||
|
import nest_asyncio
|
||||||
|
# apply it
|
||||||
|
nest_asyncio.apply()
|
||||||
|
```
|
||||||
|
|
||||||
|
An issue related to FastCGI was brought forth [here](https://github.com/caronc/apprise/issues/610) and solved using this method.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue