jsaddiction / TrailerTech

Download Trailers for you movies
MIT License
13 stars 4 forks source link

Radarr integration script exited with code 1 #37

Closed frazzyfin closed 3 years ago

frazzyfin commented 3 years ago

When I try and add TrailerTech.py as a custom script in Radarr, as per the instructions in the wiki, when I press the Test or Save button, I get an error saying the Script exited with code: 1.

Log output:

2021-06-07 21:47:38.1|Error|TrailerTech.py|2021-06-07 21:47:38,174 - INFO - Updater - Checking Git for updates.
2021-06-07 21:47:38.1|Error|TrailerTech.py|Traceback (most recent call last):
2021-06-07 21:47:38.1|Error|TrailerTech.py|  File "/config/scripts/TrailerTech/utils/updater.py", line 187, in pull
2021-06-07 21:47:38.1|Error|TrailerTech.py|    resp = str(repo.git.pull()).splitlines()
2021-06-07 21:47:38.1|Error|TrailerTech.py|  File "/usr/local/lib/python3.8/dist-packages/git/cmd.py", line 588, in <lambda>
2021-06-07 21:47:38.1|Error|TrailerTech.py|    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
2021-06-07 21:47:38.1|Error|TrailerTech.py|  File "/usr/local/lib/python3.8/dist-packages/git/cmd.py", line 1134, in _call_process
2021-06-07 21:47:38.1|Error|TrailerTech.py|    return self.execute(call, **exec_kwargs)
2021-06-07 21:47:38.1|Error|TrailerTech.py|  File "/usr/local/lib/python3.8/dist-packages/git/cmd.py", line 931, in execute
2021-06-07 21:47:38.1|Error|TrailerTech.py|    raise GitCommandError(redacted_command, status, stderr_value, stdout_value)
2021-06-07 21:47:38.1|Error|TrailerTech.py|git.exc.GitCommandError: Cmd('git') failed due to: exit code(1)
2021-06-07 21:47:38.1|Error|TrailerTech.py|  cmdline: git pull
2021-06-07 21:47:38.1|Error|TrailerTech.py|  stderr: 'error: cannot open .git/FETCH_HEAD: Permission denied'
2021-06-07 21:47:38.1|Error|TrailerTech.py|During handling of the above exception, another exception occurred:
2021-06-07 21:47:38.1|Error|TrailerTech.py|Traceback (most recent call last):
2021-06-07 21:47:38.1|Error|TrailerTech.py|  File "/config/scripts/TrailerTech/TrailerTech.py", line 8, in <module>
2021-06-07 21:47:38.1|Error|TrailerTech.py|    from utils import config, logger, env, updater, args
2021-06-07 21:47:38.1|Error|TrailerTech.py|  File "/config/scripts/TrailerTech/utils/__init__.py", line 22, in <module>
2021-06-07 21:47:38.1|Error|TrailerTech.py|    updater.pull(check_dev=True)
2021-06-07 21:47:38.1|Error|TrailerTech.py|  File "/config/scripts/TrailerTech/utils/updater.py", line 200, in pull
2021-06-07 21:47:38.1|Error|TrailerTech.py|    if err_list[3] == "  stderr: 'error: Your local changes to the following files would be overwritten by merge:":
2021-06-07 21:47:38.1|Error|TrailerTech.py|IndexError: list index out of range
2021-06-07 21:47:38.2|Warn|RadarrErrorPipeline|Invalid request Validation failed: 
 -- : Script exited with code: 1
frazzyfin commented 3 years ago

I fixed this by changing the file owner and group of .git/FETCH_HEAD and .git/ORIG_HEAD by running the following commands on the file in the docker container:

chown -R abc /config/scripts/TrailerTech/.git/ORIG_HEAD
chown -R abc /config/scripts/TrailerTech/.git/FETCH_HEAD
chgrp -R abc /config/scripts/TrailerTech/.git/ORIG_HEAD
chgrp -R abc /config/scripts/TrailerTech/.git/FETCH_HEAD