Updated Ubuntu, broke/fixed Python now can't post process

Post any problems / bugs / issues that are Mylar-related in here.
Post Reply
dbznokia
Posts: 86
Joined: Fri May 16, 2014 12:57 am

Updated Ubuntu, broke/fixed Python now can't post process

Post by dbznokia »

Needed to update Ubuntu, it updated to Ubuntu 22.04.3 LTS and must have done something to python linking in the process. Recreated symlinks etc.. but now my post processing stopped working with NZBGet.

The log from NZBGet is:

Code: Select all

Sat Nov 25 2023 17:39:47	DETAIL	Unparking file Incredible Hulk 002 (2023) (Digital-Empire).cbz
Sat Nov 25 2023 17:39:47	INFO	Incredible.Hulk.002.2023.Digital-Empire returned from history back to download queue
Sat Nov 25 2023 17:39:47	INFO	Reordering files for Incredible.Hulk.002.2023.Digital-Empire
Sat Nov 25 2023 17:39:53	INFO	Successfully downloaded Incredible.Hulk.002.2023.Digital-Empire/Incredible Hulk 002 (2023) (Digital-Empire).cbz
Sat Nov 25 2023 17:39:53	INFO	Collection Incredible.Hulk.002.2023.Digital-Empire completely downloaded
Sat Nov 25 2023 17:39:53	INFO	Queueing Incredible.Hulk.002.2023.Digital-Empire for post-processing
Sat Nov 25 2023 17:39:53	INFO	Checking renamed files for Incredible.Hulk.002.2023.Digital-Empire
Sat Nov 25 2023 17:39:53	INFO	No renamed files found for Incredible.Hulk.002.2023.Digital-Empire
Sat Nov 25 2023 17:39:53	INFO	Checking renamed archive files for Incredible.Hulk.002.2023.Digital-Empire
Sat Nov 25 2023 17:39:53	INFO	No renamed archive files found for Incredible.Hulk.002.2023.Digital-Empire
Sat Nov 25 2023 17:39:53	INFO	Nothing to unpack for Incredible.Hulk.002.2023.Digital-Empire
Sat Nov 25 2023 17:39:53	INFO	Cleaning up Incredible.Hulk.002.2023.Digital-Empire
Sat Nov 25 2023 17:39:53	INFO	Nothing to cleanup for Incredible.Hulk.002.2023.Digital-Empire
Sat Nov 25 2023 17:39:54	INFO	Moving completed files for Incredible.Hulk.002.2023.Digital-Empire
Sat Nov 25 2023 17:39:54	INFO	Moving file Incredible Hulk 002 (2023) (Digital-Empire).cbz to /mnt/public/completed/comics/Incredible.Hulk.002.2023.Digital-Empire
Sat Nov 25 2023 17:39:54	INFO	Move for Incredible.Hulk.002.2023.Digital-Empire successful
Sat Nov 25 2023 17:39:54	INFO	Executing post-process-script ComicRN.py for Incredible.Hulk.002.2023.Digital-Empire
Sat Nov 25 2023 17:39:55	INFO	ComicRN:   File "/opt/nzbget/scripts/ComicRN.py", line 40
Sat Nov 25 2023 17:39:55	INFO	ComicRN:     print 'Download of "%s" has failed.' % (os.environ['NZBPP_NZBNAME'])
Sat Nov 25 2023 17:39:55	INFO	ComicRN:     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sat Nov 25 2023 17:39:55	INFO	ComicRN: SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
Sat Nov 25 2023 17:39:55	ERROR	Post-process-script ComicRN.py for Incredible.Hulk.002.2023.Digital-Empire failed (terminated with unknown status)
Sat Nov 25 2023 17:39:55	INFO	Collection Incredible.Hulk.002.2023.Digital-Empire added to history
My Python version is Python 3.10.12
NZBGet is 21.2-testing-r2333
comicrn_version is 1.01
apc_version is 2.04
User avatar
evilhero
Site Admin
Posts: 2887
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Updated Ubuntu, broke/fixed Python now can't post process

Post by evilhero »

You're using a really old version of ComicRN that was from the original python2 repo. Get the current version from the post-processing/nzbget directory of your mylar3 installation and replace your existing version (probably originally copied into the scripts directory of nzbget)

While the recommended and preferred method is to use the built in Completed Download Handling (CDH) in mylar instead of the scripts, you can still use them you're just not going to be able to use some of the post-processing features that come only with CDH.

Also, since you just upgraded it may be time to set sail on nzbget and switch to sabnzbd. Nzbget is no longer getting updates and is now considered a dead project (I believe earlier this year the dev closed up shop). So it will work, but there may come a time soon when it won't.
dbznokia
Posts: 86
Joined: Fri May 16, 2014 12:57 am

Re: Updated Ubuntu, broke/fixed Python now can't post process

Post by dbznokia »

Yeah i went from sab to nzb back in the day, just nicer UI so while it still works, happy to keep using it.

So, i compared the ComicRN from v3 and it is the same as what i have? I'll check to make sure i don't have multiple copies of it. Oh, is CDH new in v3? And does it replace the need for these scripts? Maybe i'll just switch to that, will take a look.
dbznokia
Posts: 86
Joined: Fri May 16, 2014 12:57 am

Re: Updated Ubuntu, broke/fixed Python now can't post process

Post by dbznokia »

I just updated from GitHub and now get this in the log with the same error as before
ComicRN: print "Your ComicRN.py script is outdated. I'll force this through, but Failed Download Handling and possible enhancements/fixes will not work and could cause errors."
Am i grabbing from wrong branch? https://github.com/mylar3/mylar3/blob/m ... ComicRN.py
User avatar
evilhero
Site Admin
Posts: 2887
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Updated Ubuntu, broke/fixed Python now can't post process

Post by evilhero »

Not wrong branch, just hasn't been updated in probably a year or two at the very least.

CDH was around in v2 of mylar, but because everyone was already using the scripts many didn't move away from them until they migrated to v3. We've always told users that while the scripts are available, we highly recommend using CDH as it's a more efficient and accurate method for post-processing for the vast majority of users.

CDH is as simple as just enabling it within mylar for the given downloader client. Disable the ComicRN script in nzbget if it's still being used and that's it.
dbznokia
Posts: 86
Joined: Fri May 16, 2014 12:57 am

Re: Updated Ubuntu, broke/fixed Python now can't post process

Post by dbznokia »

ok maybe that's why it's never worked. It was enabled but so was the script in nzbget. Is there a way to force run CDH to ensure it's working?

This is how mine is currently setup: https://imgur.com/a/OT3iMMj
dbznokia
Posts: 86
Joined: Fri May 16, 2014 12:57 am

Re: Updated Ubuntu, broke/fixed Python now can't post process

Post by dbznokia »

Ok getting somewhere

Code: Select all

2023-11-30 15:40:55	ERROR	[POST-PROCESSING] Post-Processing ABORTED.
2023-11-30 15:40:55	ERROR	[POST-PROCESSING] Failed to move /opt/mylar3/data/cache/mylar_6njyhgbg/Incredible Hulk 001 (2023) (Digital) (Zone-Empire).cbz:
2023-11-30 15:40:55	ERROR	[MOVE] error : [Errno 13] Permission denied: '/mnt/Comics/Marvel/Incredible Hulk (2023)/Incredible Hulk 001 (2023).cbz'
OK fixed that now too. When i grab a new title, for some reason the folder it creates doesn't have all the permissions on it.
User avatar
evilhero
Site Admin
Posts: 2887
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Updated Ubuntu, broke/fixed Python now can't post process

Post by evilhero »

The user running mylar doesn't have enough permissions to move the file to that location, or doesn't have enough perms to delete in the cache (/opt will always default to root only access, so unless you're sudo-ing, or you chown/chmod'd the directory recursively its possible the perms might be missing something).

Also can't force test the CDH, you just have to manually search for a single issue and you can monitor it that way.
Post Reply