Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError (Var error with '.split') #1

Closed
Keiishu opened this issue Jul 28, 2019 · 1 comment
Closed

AttributeError (Var error with '.split') #1

Keiishu opened this issue Jul 28, 2019 · 1 comment

Comments

@Keiishu
Copy link

Keiishu commented Jul 28, 2019

Installed it from github with pip3.

The script just won't start, showing the following error :

  File "/home/pi/.local/bin/gnotify", line 11, in <module>
    load_entry_point('gnotify==0.1.0', 'console_scripts', 'gnotify')()
  File "/home/pi/.local/lib/python3.7/site-packages/gnotify/gnotify.py", line 20, in main
    ips = os.getenv("GNOTIFY_IPS").split(',')
AttributeError: 'NoneType' object has no attribute 'split'

Apparently, it's caused by trying to split a null string. And in fact, the environment variables the script is trying to read are null, like GNOTIFY_LANG or GNOTIFY_IPS.

Running on a RPi 3B+ r1.2 with Raspbian Buster
Python 3.7.3 / pip 18.1

EDIT : Works with exporting manually the env variables. For exemple :
export GNOTIFY_LANG="fr-FR"
export GNOTIFY_IPS="192.168.1.4"

@bierdok
Copy link
Owner

bierdok commented Sep 11, 2019

Hello @Keiishu ,
This issue has been fixed. eb8fc31

@bierdok bierdok closed this as completed Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants