Forums

Newbie to pythonanywhere

I have a script that works fine in a python notebook but getting errors on PA - I have installed the appropriate pushover package first on bash so bit lost.


from pushover import init, Client

ImportError: cannot import name 'init'


Can share code but perhaps this is something basic I have done wrong in the setup?

Rav

Here is the code

My Code

Do you have a file called pushover.py in the directory with the file that's doing the import?

You could also be using a different version of pushiver. Check the version of pushover and make sure it has an init.

Hi Glenn

  1. Version same, has init method. 2 . No the pushover.py lives here

~/.local/lib/python3.6/site-packages/pushover

Is that the issue?

OK. Do

import pushover
print(pushover.__file__)

that should tell us where you're getting pushover imported from.