question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

errors in postSonarr.py

See original GitHub issue

Hi I’ve verified that manual.py works in my macOS Catalina terminal window. I’ve configured sonarr in what I assume is the correct way. Episode renaming : Yes Download Client: BitTorrent Completed Download Handling: No Connect - custom script. postSonarr, grab=no, download=yes, upgrade=yes, rename=no, path=“/usr/local/bin/python3”, arguments=“/Users/andy/sickbeard_mp4_automator/postSonarr.py”

Nothing happens when the download is completed. So I opened a terminal and tried out the postSonarr script directly and got this. Any ideas?

andy@MozzersMini ~ % /usr/local/bin/python3 /Users/andy/sickbeard_mp4_automator/postSonarr.py
2020-05-12 10:15:59 - SonarrPostProcess - INFO - Sonarr extra script post processing started.
2020-05-12 10:15:59 - resources.readsettings - INFO - /usr/local/opt/python/bin/python3.7
2020-05-12 10:15:59 - resources.readsettings - INFO - Loading config file /Users/andy/sickbeard_mp4_automator/config/autoProcess.ini.
Traceback (most recent call last):
  File "/Users/andy/sickbeard_mp4_automator/postSonarr.py", line 84, in <module>
    tvdb_id = int(os.environ.get('sonarr_series_tvdbid'))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

thanks

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mozzer502commented, May 13, 2020

woohoo and we have working system!!! (almost) As far as I can tell everything now works. There’s no “process completed” message in the log file so I’m assuming it ended well. I do see this error though towards the end of the log.

2020-05-13 09:24:07 - resources.mediaprocessor - INFO - Starting conversion.
2020-05-13 09:25:25 - resources.mediaprocessor - INFO - /Users/andy/Downloads/Torrents/sonarr/Family.Guy.S18E19.Holly.Bibble.1080p.HULU.WEBRip.DDP5.1.x264-CtrlHD[rarbg]-convert/Family.Guy.S18E19.Holly.Bibble.1080p.HULU.WEB-DL.DD+5.1.H.264-CtrlHD.mp4 created.
2020-05-13 09:25:26 - qBittorrentPostProcess - INFO - Passing /Users/andy/Downloads/Torrents/sonarr/Family.Guy.S18E19.Holly.Bibble.1080p.HULU.WEBRip.DDP5.1.x264-CtrlHD[rarbg]-convert directory to Sonarr.
2020-05-13 09:25:26 - autoprocess.sonarr - INFO - Sonarr notifier started.
2020-05-13 09:25:26 - autoprocess.sonarr - INFO - Requesting Sonarr to scan directory '/Users/andy/Downloads/Torrents/sonarr/Family.Guy.S18E19.Holly.Bibble.1080p.HULU.WEBRip.DDP5.1.x264-CtrlHD[rarbg]-convert'.
2020-05-13 09:25:26 - autoprocess.sonarr - INFO - Sonarr response: queued.
2020-05-13 09:25:26 - qBittorrentPostProcess - ERROR - Unable to delete temporary directory
Traceback (most recent call last):
  File "/Users/andy/sickbeard_mp4_automator/qBittorrentPostProcess.py", line 197, in <module>
    os.rmdir(delete_dir)
OSError: [Errno 66] Directory not empty: '/Users/andy/Downloads/Torrents/sonarr/Family.Guy.S18E19.Holly.Bibble.1080p.HULU.WEBRip.DDP5.1.x264-CtrlHD[rarbg]-convert'
2020-05-13 09:25:28 - SonarrPostProcess - INFO - Sonarr extra script post processing started.
2020-05-13 09:25:28 - resources.readsettings - INFO - /usr/local/opt/python/bin/python3.7
2020-05-13 09:25:28 - resources.readsettings - INFO - Loading config file /Users/andy/sickbeard_mp4_automator/config/autoProcess.ini.

Thank you for your help @mdhiggins I did not expect this kind of helpful, responsive service from a GitHub account 😃

0reactions
mdhigginscommented, May 13, 2020

Yeah sonarr response queued is the last thing you should see. Sonarr should take things from there.

Glad it’s working!

Read more comments on GitHub >

github_iconTop Results From Across the Web

PostSonarr · Issue #1021 · mdhiggins ...
Nothing has changed within any files/system etc but i get an error when setting ... postSonarr.py | TypeError: int() argument must be a...
Read more >
Custom script "exited with code: 1" error (postsonarr.py ...
Description of issue: I'm trying to configure the sickbeard_mp4_automator script with Sonarr v3. The scripts perfectly with Sonarr version 2 ...
Read more >
SMA Conversion/Tagging Automation Script
Setup the postSonarr.py script via Settings > Connect > Connections > + (Add) ... allow them to trigger the refresh, otherwise you will...
Read more >
Sonarr and Custom Scripts
exeFile "C:\Automator\postSonarr.py", line 34, in <module> python. ... edit: When I run the script outside of Sonarr, I get this error:
Read more >
Python Script Error Message
Hello I'm hoping someone can help and that I'm in the right place. The problem I have is running a program on Windows...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found