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

Errors & not connecting #2

Open
timeighty5 opened this issue Apr 19, 2020 · 2 comments
Open

Errors & not connecting #2

timeighty5 opened this issue Apr 19, 2020 · 2 comments

Comments

@timeighty5
Copy link

timeighty5 commented Apr 19, 2020

The script doesn't autorun on reboot. In my root's crontab, I see:

@reboot /usr/bin/python3 /home/pi/BusyLight/app.py

But for some reason, it doesn't connect to Azure IoT.

python3 --version

Python 3.7.3

sudo python3 app.py

Traceback (most recent call last):
File "app.py", line 112, in
asyncio.run(main())
AttributeError: module 'asyncio' has no attribute 'run'

sudo python3.7 app.py

Allows the Pi to connect to Azure IoT

Not sure what the issue is.

@jimbobbennett
Copy link
Owner

Looks like something has gone haywire with your python versions. It's strange that the version that comes out is high enough to have asyncio, but when run it looks like its an earlier version.

As a short workaround, you could change your crontab entry to use Python3.7.

@asajohnson
Copy link
Contributor

@timeighty5 - I had a similar issue after it had been working for a bit (I had done some tinkering in the meantime, so not sure what caused the issue). I used @jimbobbennett 's workaround to update the crontab entry and it works now even after restart.

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

3 participants