springfall2008 / predbat_addon

Predbat Home Assistant Add-on
Other
9 stars 9 forks source link

Predbat Docker #4

Closed dandwhelan closed 2 months ago

dandwhelan commented 3 months ago

Hi, I've been trying to get Docker Predbat working on my work predbat.txt hass.txt in progress docker raspberrypi.

When I run the following...

docker run docker.io/library/predbat I continuously get the below message. Included my predbat.py and hass.py in this issue.

Any help would be appreciated :)

  File "/config/predbat.py", line 37, in <module>
    from download import predbat_update_move, predbat_update_download, check_install
ModuleNotFoundError: No module named 'download'
Predbat crashed. Restarting in 5 seconds...
Starting Predbat standalone...
Traceback (most recent call last):
  File "/config/hass.py", line 5, in <module>
    import predbat
  File "/config/predbat.py", line 37, in <module>
    from download import predbat_update_move, predbat_update_download, check_install
ModuleNotFoundError: No module named 'download'
Predbat crashed. Restarting in 5 seconds...
Starting Predbat standalone...
Traceback (most recent call last):
  File "/config/hass.py", line 5, in <module>
    import predbat
  File "/config/predbat.py", line 37, in <module>
    from download import predbat_update_move, predbat_update_download, check_install
ModuleNotFoundError: No module named 'download'
Predbat crashed. Restarting in 5 seconds...
Starting Predbat standalone...
Traceback (most recent call last):
  File "/config/hass.py", line 5, in <module>
    import predbat
  File "/config/predbat.py", line 37, in <module>
    from download import predbat_update_move, predbat_update_download, check_install
ModuleNotFoundError: No module named 'download'
Predbat crashed. Restarting in 5 seconds...
Starting Predbat standalone...
Traceback (most recent call last):
  File "/config/hass.py", line 5, in <module>
    import predbat
  File "/config/predbat.py", line 37, in <module>
    from download import predbat_update_move, predbat_update_download, check_install
ModuleNotFoundError: No module named 'download'
Predbat crashed. Restarting in 5 seconds...
Starting Predbat standalone...
Traceback (most recent call last):
  File "/config/hass.py", line 5, in <module>
    import predbat
  File "/config/predbat.py", line 37, in <module>
    from download import predbat_update_move, predbat_update_download, check_install
ModuleNotFoundError: No module named 'download'
Predbat crashed. Restarting in 5 seconds...
Starting Predbat standalone...
Traceback (most recent call last):
  File "/config/hass.py", line 5, in <module>
    import predbat
  File "/config/predbat.py", line 37, in <module>
    from download import predbat_update_move, predbat_update_download, check_install
ModuleNotFoundError: No module named 'download'
Predbat crashed. Restarting in 5 seconds...
Starting Predbat standalone...
Traceback (most recent call last):
  File "/config/hass.py", line 5, in <module>
    import predbat
  File "/config/predbat.py", line 37, in <module>
    from download import predbat_update_move, predbat_update_download, check_install
ModuleNotFoundError: No module named 'download'
Predbat crashed. Restarting in 5 seconds...
Starting Predbat standalone...
Traceback (most recent call last):
  File "/config/hass.py", line 5, in <module>
    import predbat
  File "/config/predbat.py", line 37, in <module>
    from download import predbat_update_move, predbat_update_download, check_install
ModuleNotFoundError: No module named 'download'
Predbat crashed. Restarting in 5 seconds...
Starting Predbat standalone...
Traceback (most recent call last):
  File "/config/hass.py", line 5, in <module>
    import predbat
  File "/config/predbat.py", line 37, in <module>
    from download import predbat_update_move, predbat_update_download, check_install
ModuleNotFoundError: No module named 'download'
Predbat crashed. Restarting in 5 seconds...
Starting Predbat standalone...
Traceback (most recent call last):
  File "/config/hass.py", line 5, in <module>
    import predbat
  File "/config/predbat.py", line 37, in <module>
    from download import predbat_update_move, predbat_update_download, check_install
ModuleNotFoundError: No module named 'download'
Predbat crashed. Restarting in 5 seconds...
Starting Predbat standalone...
Traceback (most recent call last):
  File "/config/hass.py", line 5, in <module>
    import predbat
  File "/config/predbat.py", line 37, in <module>
    from download import predbat_update_move, predbat_update_download, check_install
ModuleNotFoundError: No module named 'download'
Predbat crashed. Restarting in 5 seconds...
Starting Predbat standalone...
Traceback (most recent call last):
  File "/config/hass.py", line 5, in <module>
    import predbat
  File "/config/predbat.py", line 37, in <module>
    from download import predbat_update_move, predbat_update_download, check_install
ModuleNotFoundError: No module named 'download'
Predbat crashed. Restarting in 5 seconds...
dandwhelan commented 3 months ago

I feel like this might be bad timing for me to look at older documentation, as v8 has just been released.

image

springfall2008 commented 3 months ago

I think you are missing the other files for Predbat v8?

dandwhelan commented 3 months ago

Now v8 has been offically released I've tried again with all your updated files. Predbat starts, when I manually start the docker run docker.io/library/predbat I get this error. but everything else seems to work fine :)

Starting Predbat standalone... /config/predbat.py:10961: SyntaxWarning: invalid escape sequence '\s' res = re.search('THIS_VERSION\s+=\s+"([0-9.v]+)"', line)

springfall2008 commented 2 months ago

You can ignore that warning its fine.

BTW: Did you have to change anything in the Dockerfile.standalone?

dandwhelan commented 2 months ago

Nah but I did have to update the time to BST London after an update.

dandwhelan commented 2 months ago

Also on the instructions it said copy predbat.py. I know you've separated the files lately so I copied over all the .py files.

Download predbat.py from Predbat repo (https://github.com/springfall2008/batpred/blob/main/apps/predbat/predbat.py) and place it into rootfs

springfall2008 commented 2 months ago

Did this get resolved?

dandwhelan commented 2 months ago

Yeah. I think I started again from scratch.