iCloud Drive

Post any problems / bugs / issues that are Mylar-related in here.
Post Reply
Ubergeeksov
Posts: 6
Joined: Mon Sep 28, 2015 1:35 pm

iCloud Drive

Post by Ubergeeksov »

Hi,

I have configured Mylar so that the destination folder is in my iCloud Drive. However, the file will not then upload from my local machine to iCloud.

If I remove post-processing and physically move the downloaded file from the source folder to the iCloud Drive folder, then it will upload to iCloud. The problem therefore appears to arise due to post-processing.

I have looked at the log and see that I have a post-processing error:

Uncaught exception: Traceback (most recent call last):
File "/Applications/Mylar/mylar/logger.py", line 159, in new_run
old_run(*args, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/Applications/Mylar/mylar/PostProcessor.py", line 727, in Process
if helpers.is_number(sandwich):
UnboundLocalError: local variable 'sandwich' referenced before assignment

I am using Mac OS X Yosemite and SABnzbd.

Any ideas as I would like to automate downloads as much as possible.

Thanks,

Richard
User avatar
evilhero
Site Admin
Posts: 2887
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: iCloud Drive

Post by evilhero »

Based on that error, and not seeing the leadup to the problem - I would guess that you're trying to run the ComicRN.py script on files that you downloaded outside of Mylar. Mylar can only post-process filfes with the ComicRN.py script if the file was snatched by Mylar.

If you downloaded a bunch of files outside of Mylar and want them scanned in, you would use the Manual Post-Processing option within the Manage tab/Manual Post-Processing tab. Keep in mind that if a given series doesn't exist in your watchlist, Mylar won't post-process said files (it will just skip them over).

If you received the error and you weren't doing the above, then I'd need to see the mylar.log file itself leading up to the error in order to try and figure out what is happening.
Ubergeeksov
Posts: 6
Joined: Mon Sep 28, 2015 1:35 pm

Re: iCloud Drive

Post by Ubergeeksov »

Hi again and thanks for the prompt response. It was during a Mylar snatch rather a scan in. I have repeated the process and will paste the first page of the log at the end. Incidentally, it has snatched two files. The first seems to have post-processed successfully (although will not upload to iCloud), whilst the other seems to be stuck in SABnzbd's post-processing.

Thanks,

Richard


Timestamp Level Message
2015-09-28 21:55:51 INFO [RSS] Watchlist Check complete.
2015-09-28 21:55:51 INFO Completed RSS Search scan
2015-09-28 21:55:51 INFO Initiating Search Scan at scheduled interval of 20 minutes.
2015-09-28 21:55:51 INFO [RSS] Watchlist Check for new Releases
2015-09-28 21:55:51 INFO [RSS] RSS Feed Check/Update Complete
2015-09-28 21:55:51 INFO [RSS] (Usenet Crawler) 0 entries indexed.
2015-09-28 21:55:51 INFO [RSS] (NZB Planet) 0 entries indexed.
2015-09-28 21:55:51 INFO [RSS] (NZBis) 0 entries indexed.
2015-09-28 21:55:51 INFO [RSS] (OZnzb) 0 entries indexed.
2015-09-28 21:55:43 INFO [RSS] Initiating RSS Feed Check for NZB Providers.
2015-09-28 21:55:43 INFO RSS Feed Check was last run at : 2015-09-28 21:35:43
2015-09-28 21:55:13 INFO delaying startup thread for 30 seconds to avoid locks.
2015-09-28 21:49:15 ERROR Uncaught exception: Traceback (most recent call last):
File "/Applications/Mylar/mylar/logger.py", line 159, in new_run
old_run(*args, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/Applications/Mylar/mylar/PostProcessor.py", line 727, in Process
if helpers.is_number(sandwich):
UnboundLocalError: local variable 'sandwich' referenced before assignment
2015-09-28 21:49:15 INFO [POST-PROCESSING] issuenzb not found.
2015-09-28 21:49:15 INFO [POST-PROCESSING] Could not detect as a standard issue - checking against annuals.
2015-09-28 21:49:15 INFO Starting postprocessing for : Deadpool.vs.Thanos.002.2015.Digital.Mephisto-Empire
2015-09-28 21:49:15 INFO ComicRN.py version: 1.01 -- autoProcessComics.py version: 1.0
2015-09-28 21:48:59 INFO Finished grabbing what I could.
2015-09-28 21:48:59 INFO [UPDATER] Updated the status (Snatched) complete for Deadpool vs. Thanos Issue: 2
2015-09-28 21:48:59 INFO [UPDATER] Updating status to snatched
2015-09-28 21:48:59 INFO setting the alternate nzbname for this download grabbed by OZnzb (newznab) in the nzblog to : Deadpool.vs..Thanos.002.2015.Digital.Mephisto-Empire
2015-09-28 21:48:59 INFO setting the nzbid for this download grabbed by OZnzb (newznab) in the nzblog to : 1e03b2e3f970b0f6f8a872902dcd7db0
2015-09-28 21:48:59 INFO Successfully sent nzb file to SABnzbd
2015-09-28 21:48:59 INFO Found Deadpool vs. Thanos (2015) issue: 2 using OZnzb (newznab)
2015-09-28 21:48:59 INFO filen: Deadpool.vs..Thanos.002.2015.Digital.Mephisto-Empire -- nzbname: Deadpool.vs.Thanos.002.2015.Digital.Mephisto-Empire are not identical. Storing extra value as : Deadpool.vs..Thanos.002.2015.Digital.Mephisto-Empire
2015-09-28 21:48:57 INFO Download URL: https://legendapi.oznzb.com/api?apikey= ... 902dcd7db0 [VerifySSL:False]
2015-09-28 21:48:14 INFO [POST-PROCESSING] Post-Processing completed for: Deadpool vs. Thanos issue: 1
2015-09-28 21:48:14 INFO [POST-PROCESSING][NOTIFIER] PushBullet notifications sent.
2015-09-28 21:48:13 INFO [POST-PROCESSING][FILE-RESCAN] I have physically found 1 issues, ignored 0 issues, snatched 0 issues, and accounted for 0 in an Archived state [ Total Issue Count: 1 / 2 ]
2015-09-28 21:48:13 INFO [POST-PROCESSING][FILE-RESCAN] Total files located: 1
2015-09-28 21:48:13 INFO [POST-PROCESSING][FILE-RESCAN] Updated the status of 1 issues for Deadpool vs. Thanos (2015) that were not found.
2015-09-28 21:48:13 INFO [POST-PROCESSING][FILE-RESCAN] Now checking files for Deadpool vs. Thanos (2015) in :Deadpool vs. Thanos (2015)
2015-09-28 21:48:13 INFO [POST-PROCESSING][FILE-RESCAN] Now checking files for Deadpool vs. Thanos (2015) in /Users/Richard/Desktop/Deadpool vs. Thanos (2015)
2015-09-28 21:48:13 INFO [POST-PROCESSING][UPDATER] Updating Status (Downloaded) now complete for Deadpool vs. Thanos issue: 1
2015-09-28 21:48:13 INFO [POST-PROCESSING][UPDATER] Setting status to Downloaded in history.
2015-09-28 21:48:13 INFO [POST-PROCESSING][DIRECTORY-CHECK] Found comic directory: /Users/Richard/Desktop/Deadpool vs. Thanos (2015)
2015-09-28 21:48:13 INFO [POST-PROCESSING] [1/1] Starting Post-Processing for Deadpool vs. Thanos issue: 1
2015-09-28 21:48:13 INFO [DUPECHECK] Duplication detection returned no hits. This is not a duplicate of anything that I have scanned in as of yet.
2015-09-28 21:48:13 INFO [DUPECHECK] Duplicate check for /Volumes/Media/Downloads/incomplete/mylar/Deadpool.vs.Thanos.001.2015.Digital.Mephisto-Empire
2015-09-28 21:48:13 INFO [POST-PROCESSING] issuenzb found.
2015-09-28 21:48:13 INFO Starting postprocessing for : Deadpool.vs.Thanos.001.2015.Digital.Mephisto-Empire
2015-09-28 21:48:13 INFO ComicRN.py version: 1.01 -- autoProcessComics.py version: 1.0
2015-09-28 21:47:55 INFO pausing for 60 seconds before continuing to avoid hammering
2015-09-28 21:47:55 INFO Shhh be very quiet...I'm looking for Deadpool vs. Thanos issue: 2 (2015) using OZnzb (newznab)
2015-09-28 21:47:55 INFO Finished searching via :rss. Issue not found - status kept as Wanted.
2015-09-28 21:47:55 INFO Could not find Issue 2 of Deadpool vs. Thanos(2015) using Usenet Crawler [rss]
2015-09-28 21:47:55 INFO Shhh be very quiet...I'm looking for Deadpool vs. Thanos issue: 2 (2015) using Usenet Crawler(newznab) [RSS]
2015-09-28 21:47:55 INFO Could not find Issue 2 of Deadpool vs. Thanos(2015) using NZB Planet [rss]
2015-09-28 21:47:55 INFO Shhh be very quiet...I'm looking for Deadpool vs. Thanos issue: 2 (2015) using NZB Planet(newznab) [RSS]
2015-09-28 21:47:55 INFO Could not find Issue 2 of Deadpool vs. Thanos(2015) using NZBis [rss]
2015-09-28 21:47:55 INFO Shhh be very quiet...I'm looking for Deadpool vs. Thanos issue: 2 (2015) using NZBis(newznab) [RSS]
2015-09-28 21:47:55 INFO Could not find Issue 2 of Deadpool vs. Thanos(2015) using OZnzb [rss]
2015-09-28 21:47:55 INFO Shhh be very quiet...I'm looking for Deadpool vs. Thanos issue: 2 (2015) using OZnzb(newznab) [RSS]
2015-09-28 21:47:55 INFO search provider order is ['newznab:OZnzb', 'newznab:NZBis', 'newznab:NZB Planet', 'newznab:Usenet Crawler']
2015-09-28 21:47:55 INFO Issue Title given as : part two
2015-09-28 21:47:55 INFO [UPDATER] Updated the status (Snatched) complete for Deadpool vs. Thanos Issue: 1
2015-09-28 21:47:55 INFO [UPDATER] Updating status to snatched
2015-09-28 21:47:55 INFO setting the alternate nzbname for this download grabbed by OZnzb (newznab) in the nzblog to : Deadpool.vs..Thanos.001.2015.Digital.Mephisto-Empire
2015-09-28 21:47:55 INFO setting the nzbid for this download grabbed by OZnzb (newznab) in the nzblog to : 33519f2da2d06d66652c574cb592187d
2015-09-28 21:47:55 INFO Successfully sent nzb file to SABnzbd
2015-09-28 21:47:55 INFO Found Deadpool vs. Thanos (2015) issue: 1 using OZnzb (newznab)
2015-09-28 21:47:55 INFO filen: Deadpool.vs..Thanos.001.2015.Digital.Mephisto-Empire -- nzbname: Deadpool.vs.Thanos.001.2015.Digital.Mephisto-Empire are not identical. Storing extra value as : Deadpool.vs..Thanos.001.2015.Digital.Mephisto-Empire
2015-09-28 21:47:53 INFO Download URL: https://legendapi.oznzb.com/api?apikey= ... 4cb592187d [VerifySSL:False]
2015-09-28 21:46:51 INFO pausing for 60 seconds before continuing to avoid hammering
2015-09-28 21:46:51 INFO Shhh be very quiet...I'm looking for Deadpool vs. Thanos issue: 1 (2015) using OZnzb (newznab)
2015-09-28 21:46:51 INFO Finished searching via :rss. Issue not found - status kept as Wanted.
2015-09-28 21:46:51 INFO Could not find Issue 1 of Deadpool vs. Thanos(2015) using Usenet Crawler [rss]
2015-09-28 21:46:51 INFO Shhh be very quiet...I'm looking for Deadpool vs. Thanos issue: 1 (2015) using Usenet Crawler(newznab) [RSS]
2015-09-28 21:46:51 INFO Could not find Issue 1 of Deadpool vs. Thanos(2015) using NZB Planet [rss]
2015-09-28 21:46:51 INFO Shhh be very quiet...I'm looking for Deadpool vs. Thanos issue: 1 (2015) using NZB Planet(newznab) [RSS]
2015-09-28 21:46:51 INFO Could not find Issue 1 of Deadpool vs. Thanos(2015) using NZBis [rss]
2015-09-28 21:46:51 INFO Shhh be very quiet...I'm looking for Deadpool vs. Thanos issue: 1 (2015) using NZBis(newznab) [RSS]
2015-09-28 21:46:51 INFO Could not find Issue 1 of Deadpool vs. Thanos(2015) using OZnzb [rss]
2015-09-28 21:46:51 INFO Shhh be very quiet...I'm looking for Deadpool vs. Thanos issue: 1 (2015) using OZnzb(newznab) [RSS]
2015-09-28 21:46:51 INFO search provider order is ['newznab:OZnzb', 'newznab:NZBis', 'newznab:NZB Planet', 'newznab:Usenet Crawler']
2015-09-28 21:46:51 INFO Issue Title given as : part one: from her to eternity
2015-09-28 21:46:51 INFO Attempting to grab wanted issues for : Deadpool vs. Thanos
2015-09-28 21:46:51 INFO Checking the Weekly Releases list for comics I'm watching...
2015-09-28 21:46:51 INFO Checking this week pullist for new issues of Deadpool vs. Thanos
2015-09-28 21:46:51 INFO [FILE-RESCAN] I have physically found 0 issues, ignored 0 issues, snatched 0 issues, and accounted for 0 in an Archived state [ Total Issue Count: 0 / 2 ]
2015-09-28 21:46:51 INFO [FILE-RESCAN] Total files located: 0
2015-09-28 21:46:51 INFO [FILE-RESCAN] Updated the status of 2 issues for Deadpool vs. Thanos (2015) that were not found.
2015-09-28 21:46:51 INFO [FILE-RESCAN] Now checking files for Deadpool vs. Thanos (2015) in :Deadpool vs. Thanos (2015)
2015-09-28 21:46:51 INFO [FILE-RESCAN] Now checking files for Deadpool vs. Thanos (2015) in /Users/Richard/Desktop/Deadpool vs. Thanos (2015)
2015-09-28 21:46:51 INFO imported is : None
2015-09-28 21:46:51 INFO Updating complete for: Deadpool vs. Thanos
2015-09-28 21:46:51 INFO Now adding/updating issues for Deadpool vs. Thanos
2015-09-28 21:46:48 INFO Sucessfully retrieved issue details for Deadpool vs. Thanos
2015-09-28 21:46:47 INFO previous version detected as None - seeing if update required
2015-09-28 21:46:47 INFO Successfully retrieved cover for Deadpool vs. Thanos
2015-09-28 21:46:47 INFO Image header check: jpeg
2015-09-28 21:46:46 INFO [DIRECTORY-CHECK] Creating comic directory (0777) : /Users/Richard/Desktop/Deadpool vs. Thanos (2015)
2015-09-28 21:46:46 WARNING [DIRECTORY-CHECK] Could not find comic directory: /Users/Richard/Desktop/Deadpool vs. Thanos (2015)
2015-09-28 21:46:46 INFO Sucessfully retrieved details for Deadpool vs. Thanos
2015-09-28 21:46:46 INFO Now adding/updating: Deadpool vs. Thanos
2015-09-28 21:35:52 INFO [RSS] Watchlist Check complete.
2015-09-28 21:35:52 INFO Completed RSS Search scan
2015-09-28 21:35:52 INFO Initiating Search Scan at scheduled interval of 20 minutes.
2015-09-28 21:35:52 INFO [RSS] Watchlist Check for new Releases
2015-09-28 21:35:52 INFO [RSS] RSS Feed Check/Update Complete
User avatar
evilhero
Site Admin
Posts: 2887
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: iCloud Drive

Post by evilhero »

Ubergeeksov wrote:Hi again and thanks for the prompt response. It was during a Mylar snatch rather a scan in. I have repeated the process and will paste the first page of the log at the end. Incidentally, it has snatched two files. The first seems to have post-processed successfully (although will not upload to iCloud), whilst the other seems to be stuck in SABnzbd's post-processing.
The uploading to iCloud has nothing to do with Mylar - it drops it into your specified folder(s) for the given series. I would guess it's a permissions issue - when Mylar does the post-processing sequence it also changes the permissions in order to make sure things line up so that it can scan them in properly and account for said issues within the series. I would check the perms on your iCloud folder and make sure they're in line with both what's required for the sync to occur, and what Mylar is actually trying to set them to.

I'm pretty sure the actual error you're receiving now is possibly due to the status of the issue prior to it being Snatched. I came across this a few days ago, where if the status of an issue was already in a Snatched mode, and then it failed or something happened where it couldn't complete the post-processing in order to mark it as Downloaded - and then a Retry/Magnifying Glass icon was done it would error out with some obscure message about not being able to find the issues.

How is it that you're snatching the issues? (Marking them as Wanted, using the Magnifying glass icon, retrying, etc)

Also, the GUI log is not the mylar.log file itself. The file holds all the debugging information, the GUI just has the informational level which isn't very helpful when it comes to troubleshooting most times. I can see what's occuring at this point, but just for a future reference that the log files themselves hold all the information.
Ubergeeksov
Posts: 6
Joined: Mon Sep 28, 2015 1:35 pm

Re: iCloud Drive

Post by Ubergeeksov »

Hi,

I've been looking into this a bit more and the problem seems to be with the "owner" of the folder/file.

During post-processing it appears that the owner is changed to "root". This is preventing it uploading to iCloud Drive (at least on my iMac).

If I change owner of the folder and files using the chown -R command to my username, then the files will upload to iCloud.

Is there anyway to do this automatically within Mylar? I assumed that the Settings->Web Interface->Comic Location->Owner box would fulfil this purpose, but it does not seem to make any difference.

Thanks for your help.

Richard
User avatar
evilhero
Site Admin
Posts: 2887
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: iCloud Drive

Post by evilhero »

Ubergeeksov wrote:Hi,

I've been looking into this a bit more and the problem seems to be with the "owner" of the folder/file.

During post-processing it appears that the owner is changed to "root". This is preventing it uploading to iCloud Drive (at least on my iMac).

If I change owner of the folder and files using the chown -R command to my username, then the files will upload to iCloud.

Is there anyway to do this automatically within Mylar? I assumed that the Settings->Web Interface->Comic Location->Owner box would fulfil this purpose, but it does not seem to make any difference.

Thanks for your help.

Richard
Mylar only changes the permissions on the files at the end of a successful post-processing run. If it's changed prior to that, then it's quite possibly your download client is enforcing it's permissions on the download directory (if you run say SABnzbd as root, all your downloads will subsequently be tagged to the same user ownership). As far as Mylar goes, you should be able to set the owner/group setting within the configuration, save the settings and restart Mylar and everything should line up.

Keep in mind though, that if your files are set as root prior to Mylar - if Mylar doesn't have a high enough level of permissions to change root (meaning you'd need to be running Mylar as root in order for it to be changed), it wouldn't be able to change it. In most cases, if you run Mylar as a daemon/shell you're running it as a specific user and not root, which would cause problems because it couldn't change the ownership of the files.
Ubergeeksov
Posts: 6
Joined: Mon Sep 28, 2015 1:35 pm

Re: iCloud Drive

Post by Ubergeeksov »

HI,

Thanks for the additional information, but can I ask you to confirm that you are correct.

The reason I say this:

If I download the .cbr file using mylar and Sabnzbd in the fully automated set up, then it will not upload to iCloud, because the Owner is set to root.

If, however, I disable post-processing and move the .cbr from Sabnzbd's completed folder into iCloud drive, it will upload. If I check using ls -l, it reveals that the Owner is me (i.e. Richard).

If I then take that same .cbr file and run it through Mylar's manual post-processing, it will no longer upload to iCloud drive and, if I check the Owner using ls -l it has been changed to root.

It therefore appears that it is Mylar that is changing the Owner.

However, I should also point out that I have exactly the same set up on my laptop, and I do not have this problem - using a fully automated system files will upload to iCloud drive and all the .cbr files retain me (i.e. Richard) as the owner even after post-processing.

Is there something I could have done whilst installing Mylar to cause it to change the owner to root and, more importantly, is there anyway I can undo it?

Thanks.

Richard
User avatar
evilhero
Site Admin
Posts: 2887
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: iCloud Drive

Post by evilhero »

If it works in one environment and not the other than the problem would probably be the environment.

How are you running mylar - via a third party plug in of some kind? (Some of the third party stuff enforce their own permissions) What is mylar running on as far as OS?

What do you have the permissions set to within mylar for owner/group? Again, mylar can only change files to what it's being run as or if it's stipulated within the configuration as to user/group. So either how you're running it is dictating the permissions or mylar doesn't have enough permissions to properly change them within your ICloud directory.
Post Reply