Updated Troubleshooting (markdown)

Chris Caron 2022-04-19 17:21:02 -04:00
parent 8ae8a48457
commit b0c35e3583

@ -183,4 +183,52 @@ apprise -vv -t "Multi-line Variable Example" -b "$MULTILINE_VAR" \
# Note: to preserve the new lines, be sure to wrap your
# variable in quotes (like example does above).
```
```
## Pyinstaller Support
[Pyinstaller](https://pyinstaller.org/) allows to package a python application with its dependencies in a single exe.
It is possible to package an application that is using Apprise but there is a trick.
Let's take a simple script :
```python
import apprise
apobj = apprise.Apprise()
apobj.add('<SCHEME>://<FQDN>/<TOKEN>')
apobj.notify(title="a title", body="this is the body of the notification")
```
Then package with pytinstaller :
```shell
pyinstaller -F myscript.py
```
And launch it
```shell
./dist/myscript
```
We get
```shell
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/_MEIEbGkgo/apprise/attachment'
or
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/_MEIEbGkgo/apprise/plugins'
or
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/_MEIEbGkgo/apprise/config'
```
We have to use `--collect-all` option which, according to documentation :
> Collect all submodules, data files, and binaries from the specified package or module. This option can be used multiple times.
```shell
pyinstaller -F --collect-all apprise myscript.py
```
No more errors, notifications are sent.