wunderpy2 icon indicating copy to clipboard operation
wunderpy2 copied to clipboard

Using wunderpy2 in appdaemon

Open joydashy opened this issue 6 years ago • 2 comments

I am trying to get wunderpy2 working within the lovely AppDaemon (https://www.home-assistant.io/docs/ecosystem/appdaemon/)

However, I am having trouble with the import, which seems to be very picky:

Does not work:

[10:39 rb@thor appdaemon] > /home/rb/appdaemon/bin/python3.5 test.py
Traceback (most recent call last):
  File "test.py", line 1, in <module>
    import wunderpy2
ImportError: No module named 'wunderpy2'

Works fine:

[10:39 rb@thor appdaemon] > /usr/bin/python3.5 test.py
[10:39 rb@thor appdaemon] >

It's just a symlink:

[10:39 rb@thor appdaemon] > l /home/rb/appdaemon/bin/python3.5
lrwxrwxrwx 1 rbrb18 Jul 22 10:33 /home/rb/appdaemon/bin/python3.5 -> /usr/bin/python3.5

I believe this is why it will not load from within AppDaemon either.

joydashy avatar Jul 22 '18 08:07 joydashy

Hey @joydashy ,

Does the import work with other modules? From the code you linked, it looks like something with how you're calling your python3.5 executable is affecting whether wunderpy2 is on your path. Did you install wunderpy2 with pip?

Cheers, mieubrisse

mieubrisse avatar Jul 27 '18 11:07 mieubrisse

Hi,

Wunderpy2 was installed using pip indeed. I have many imported modules within AppDaemon, working just fine! Not sure why this one is different...

joydashy avatar Jul 30 '18 11:07 joydashy