michaelhball / discogs_alert

Customised, real-time alerting for your hard-to-find wantlist items.
MIT License
30 stars 7 forks source link

Dockerhub image outdated #61

Closed asgerb closed 7 months ago

asgerb commented 1 year ago

Would it be possible to update the image on dockerhub?

fmaass commented 1 year ago

yeah that would be sweet. I'm currently stuck getting it to run

2023-07-25 17:38:27 Error: No such option: -a 2023-07-25 17:39:00 Error: No such option: --alerter-type

Maybe an updated version would help :)

michaelhball commented 1 year ago

You've probably forgotten all about this by now, but I just updated the image! https://hub.docker.com/repository/docker/miggleball/discogs_alert/general

If you're still interested then I'd love to hear whether it works ?

fmaass commented 1 year ago

ha, I was eagerly awaiting it :)

Unfortunately there is a new error now:

/docker-entrypoint.sh: 5: .: cannot open /home/discogs_alert/venv/bin/activate: No such file

michaelhball commented 1 year ago

Hmph, strange. Unfortunately I'm just about to head off for a 3-week trip where I won't have my laptop to be able to look into this. I'll do my best to get onto it as soon as possible after then though 🙏 In the meantime I'll re-open the issue in case someone else might see it who has an idea on what's going wrong.

fmaass commented 1 year ago

yeah, no worries.

I think it's just a path issue. A quick fix might be If you change in docker-entrypoint.sh:

. /home/discogs_alert/venv/bin/activate

to . /venv/bin/activate

JHthe4 commented 10 months ago

Hi @michaelhball,

hope you had a nice vacation! Are you able to look into this again by any chance? Unfortunately I'm running into the same error as @fmaass.

Best

JHthe4 commented 10 months ago

yeah, no worries.

I think it's just a path issue. A quick fix might be If you change in docker-entrypoint.sh:

. /home/discogs_alert/venv/bin/activate

to . /venv/bin/activate

Were you able to get this working? I tried making the change and bind-mounting the new script on top, but unfortunately now I'm running into a new error:

alert_1  | Traceback (most recent call last):
alert_1  |   File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
alert_1  |     return _run_code(code, main_globals, None,
alert_1  |   File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
alert_1  |     exec(code, run_globals)
alert_1  |   File "/venv/lib/python3.10/site-packages/discogs_alert/__main__.py", line 7, in <module>
alert_1  |     from discogs_alert import __version__, alert as da_alert, entities as da_entities, loop as da_loop
alert_1  |   File "/venv/lib/python3.10/site-packages/discogs_alert/loop.py", line 11, in <module>
alert_1  |     from discogs_alert import client as da_client, entities as da_entities
alert_1  |   File "/venv/lib/python3.10/site-packages/discogs_alert/client.py", line 19, in <module>
alert_1  |     from webdriver_manager.core.utils import ChromeType
alert_1  | ImportError: cannot import name 'ChromeType' from 'webdriver_manager.core.utils' (/venv/lib/python3.10/site-packages/webdriver_manager/core/utils.py)
michaelhball commented 7 months ago

Hey, I know this is now a really old issue... but I've just pushed a new version of the docker image that seems to fix this and many other follow-up problems that have built up since last year. The :latest and :0.0.20 tags should both work. When testing the new image, remember that you have to carefully pass many environment variables to the container ("DA_DISCOGS_TOKEN", "DA_PUSHBULLET_TOKEN", "DA_CURRENCY_TOKEN", etc.)

michaelhball commented 7 months ago

@JHthe4 this error

Were you able to get this working? I tried making the change and bind-mounting the new script on top, but unfortunately now I'm running into a new error:

was fixed separately in the latest version (0.0.20)

fmaass commented 7 months ago

I think there is still an issue, im getting:

` Your container args are Usage: python -m discogs_alert [OPTIONS] Try 'python -m discogs_alert --help' for help.

Error: Missing option '-ct' / '--currency-token'. `

when running: docker run --env-file .env miggleball/discogs_alert:latest

michaelhball commented 7 months ago

So this isn't an issue with docker, but rather an issue with the current README documentation (or lack of). All you need to do is pass a currency token when calling docker run, e.g.

docker run -it miggleball/discogs_alert:latest -ct <your_currency_token>

You can create this currency token by registering here.

EDIT: I noticed you're using a .env file, so once you've created the currency token you can add a line to that file, as follows

DA_CURRENCY_TOKEN=<your_currency_token>