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

EOF errors when running in docker-compose #16

Closed
whizzzkid opened this issue Sep 10, 2021 · 2 comments
Closed

EOF errors when running in docker-compose #16

whizzzkid opened this issue Sep 10, 2021 · 2 comments

Comments

@whizzzkid
Copy link

whizzzkid commented Sep 10, 2021

I was planning to run this on my synology-nas, but I am facing this issue:

┏━━━━┳━━━━━━━┳━━━━━━━━━━━┓
┃ ID ┃ Title ┃ Providers ┃
┡━━━━╇━━━━━━━╇━━━━━━━━━━━┩
Traceback (most recent call last):
  File "/usr/local/bin/excludarr", line 33, in <module>
    sys.exit(load_entry_point('excludarr==0.1.4', 'console_scripts', 'excludarr')())
  File "/usr/local/lib/python3.8/site-packages/excludarr-0.1.4-py3.8.egg/excludarr/main.py", line 50, in main
  File "/usr/local/lib/python3.8/site-packages/cement/core/foundation.py", line 916, in run
    return_val = self.controller._dispatch()
  File "/usr/local/lib/python3.8/site-packages/cement/ext/ext_argparse.py", line 808, in _dispatch
    return func()
  File "/usr/local/lib/python3.8/site-packages/excludarr-0.1.4-py3.8.egg/excludarr/controllers/base.py", line 261, in exclude
  File "/usr/local/lib/python3.8/site-packages/excludarr-0.1.4-py3.8.egg/excludarr/controllers/base.py", line 117, in _exclude_radarr
  File "/usr/local/lib/python3.8/site-packages/cement/utils/shell.py", line 401, in __init__
    self.prompt()
  File "/usr/local/lib/python3.8/site-packages/cement/utils/shell.py", line 445, in prompt
    self._prompt()
  File "/usr/local/lib/python3.8/site-packages/cement/utils/shell.py", line 424, in _prompt
    self.input = input("%s " % text)
EOFError: EOF when reading a line
└────┴───────┴───────────┘Are you sure you want to change the status of the movies to: delete? (y/N)

here is my docker-compose.yaml entry:

  excludarr:
    image: haijeploeg/excludarr:latest
    container_name: excludarr
    restart: on-failure
    command: exclude -a delete
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - GENERAL_COUNTRY=CA
      - GENERAL_PROVIDERS="netflix, amazon prime video"
      - TMDB_API_KEY=${TMDB_API_KEY}
      - RADARR_URL=http://radarr:7878
      - RADARR_API_KEY=${RADARR_API_KEY}
      - RADARR_VERIFY_SSL=false

I am not sure what's causing the error. Also, is there a -y flag to accept this in the command?

@haijeploeg
Copy link
Owner

haijeploeg commented Sep 11, 2021

Hi,

That is because you are not using the -f flag. This flag basically accepts the question with a yes. Maybe I should rename the -f to -y. Because docker compose does not present a interactive prompt, you cannot accept the question, thus resulting in an EOF error.

Also, if you use radarr and excludarr in a docker-compose file, I suggest using a healthcheck on radarr and only start excludarr when radarr is fully ready. An example below (not fully working because the environment variables are not properly set and synced with radarr):

---
version: "2.1"
services:
  radarr:
    image: linuxserver/radarr
    container_name: radarr
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Amsterdam
    ports:
      - 7878:7878
    restart: unless-stopped
    healthcheck:
        test: ["CMD", "curl", "-f", "http://localhost:7878"]
        interval: 5s
        timeout: 5s
        retries: 5

  excludarr:
    image: haijeploeg/excludarr:latest
    container_name: excludarr
    restart: on-failure
    command: exclude -a delete -f
    links:
      - radarr
    depends_on:
      radarr:
        condition: service_healthy
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - GENERAL_COUNTRY=CA
      - GENERAL_PROVIDERS="netflix, amazon prime video"
      - TMDB_API_KEY=${TMDB_API_KEY}
      - RADARR_URL=http://radarr:7878
      - RADARR_API_KEY=${RADARR_API_KEY}
      - RADARR_VERIFY_SSL=false

Hope this helps :)

@whizzzkid
Copy link
Author

@haijeploeg that worked, however I'm not sure if this is actually working. will need to play more with it.

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

2 participants