[SOLVED] Problems getting Mylar set up on Windows

Post any problems / bugs / issues that are Mylar-related in here.
comicbookreader
Posts: 9
Joined: Sun Nov 17, 2013 3:40 pm

[SOLVED] Problems getting Mylar set up on Windows

Post by comicbookreader »

I'm trying to get Mylar up and running on a Windows machine and I'm hitting a few issues.

Errors are being thrown There seems to be some issue sending the nzb file to SABnzbd:
16-Nov-2013 18:32:23 - DEBUG :: CP Server Thread-6 : nzbname used for post-processing:X-Men.Gold.001.(2014).(Digital).(Zone-Empire)
16-Nov-2013 18:32:23 - DEBUG :: CP Server Thread-6 : send-to-SAB host string: http://localhost:8080/
16-Nov-2013 18:32:23 - DEBUG :: CP Server Thread-6 : ...selecting API type: http://localhost:8080//api?mode=addurl&name=
16-Nov-2013 18:32:23 - DEBUG :: CP Server Thread-6 : ...attaching nzb provider link: http://localhost:8080//api?mode=addurl& ... Empire.cbr
16-Nov-2013 18:32:23 - DEBUG :: CP Server Thread-6 : ...setting priority: http://localhost:8080//api?mode=addurl& ... ority=-100
16-Nov-2013 18:32:23 - DEBUG :: CP Server Thread-6 : ...attaching category: http://localhost:8080//api?mode=addurl& ... ic-related
16-Nov-2013 18:32:23 - DEBUG :: CP Server Thread-6 : Completed send-to-SAB link: http://localhost:8080//api?mode=addurl& ... 1f02aac71b
16-Nov-2013 18:32:24 - ERROR :: CP Server Thread-6 : Unable to send nzb file to SABnzbd


I'm also seeing in the following a ton of time in the command shell windows for Mylar:
WindowsError: [Error 32] The process cannot access the file because it is being used by another process
Logged from file logger.py, line 85
Traceback (most recent call last):
File "C:\Python27\lib\logging\handlers.py", line 77, in emit
self.doRollover()
File "C:\Python27\lib\logging\handlers.py", line 142, in doRollover
os.rename(self.baseFilename, dfn)


I'd appreciate some help because Mylar looks to be a very interesting program and I'm sure once I get past the set up issues I'll be very happy with it.
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Problems getting Mylar set up on Windows

Post by evilhero »

Well one has an answer that's easy, the other not so much ;)

For the sending to SABnzbd error - you have a trailing slash on your SABnzbd host url. so where you specify your SABnzbd URL in the configuration as http://localhost:8080/, remove the trailing slash so it's 'http://localhost:8080'

The second error involves the logger and is an outstanding issue that only affects windows users. For some reason, the logging file becomes locked and when the logfile reaches it's maximum filesize it's supposed to 'roll-over' into another file. The problem is that it can't rename the file to have the extension (.1, .2, .3, .4, or .5 respectively) so that it can resume logging operations to the standard logging file. It's a non-obtrusive error from what I've seen - meaning it doesn't break anything, it just won't log anything properly until a restart of Mylar occurs (at that point the lock releases and it can write the file properly).

I've been attempting to work on trying to fix it, but I havent had much time to devote to this one as it usually only occurs when Mylar has been running for a period of time and the log file gets rolled over.

Also, make sure you're on the development build (as any fixes will be thrown there first, plus it's more up-to-date with fixes for existing bugs).
comicbookreader
Posts: 9
Joined: Sun Nov 17, 2013 3:40 pm

Re: Problems getting Mylar set up on Windows

Post by comicbookreader »

I am using the dev build. I started wit hthe master branch but once I realized the dev had the more recent fixes, I switched over to that.

Thanks for pointing out the trailing slash. I've removed it. I've shutdown Mylar and completely restarted it. The nzb has been successfully sent to SABnzbd and downloaded. I figured it was a case of user error.

I'm not sure how/why but I now have both a mylar.log and a mylar.log.1 file when previously I only have the mylar.logfile.

Now I just need to turn the renaming post-processing back on and see if I can get that part working. Currently I'm getting the following message in SABnxbz. Again, probably user error but I'd still appreciate the help.

All in all, this is a very impressive and useful app. You've done a great job on it.
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Problems getting Mylar set up on Windows

Post by evilhero »

There really should be an error catch or a handler on people putting in a trailing slash in the url's when it may cause errors. Believe me, you're not the first to have that error, and probably not the last (until I can put in the auto-correction fix for the slash).

As far as the logging goes, the mylar.log file gets renamed to mylar.1 when the logging file exceeds a specified maximum size (100kb I believe, but it may be higher). So if you're leaving Mylar run for extended periods, you could get up to 6 log files (mylar.log, mylar.log.1, mylar.log.2, mylar.log.3, mylar.log.4, mylar.log.5) with the higher number log files being sequentially older.

The same type of lock problem occurs when the meta-tagging is enabled in Post-Processing. It performs the cbr/cbz conversion if necessary, writes the meta-data, and then moves the file to the proper series directory, but it locks up on the removing of the empty directory. I have a temporary fix, which while it doesn't remove the empty directory it doesn't lock up so things can continue along.I have a few other things I'm going to try to permanently fix that error (and hopefully the logging one as well).

If you post the error you're getting with the post-processing - I'm sure we can get it working.
comicbookreader
Posts: 9
Joined: Sun Nov 17, 2013 3:40 pm

Re: Problems getting Mylar set up on Windows

Post by comicbookreader »

I'm using X-Men Gold #1 as the test comic. I add that from the This Week list, it gets added to the want list fine. It gets sent to SABNxbz fine which then downloads it and gives me the following error:

File "P:\Software\Mylar\mylar-development\sabnzbd\ComicRN.py", line 14
print "No folder supplied - is this being called from SABnzbd or NZBGet?"
^
SyntaxError: invalid syntax


I've pointed SABnzbd to the Mylar\mylar-development\sabnzbd folder. Both Mylar and SABnzbd are using the comic-related category. SABnzbd is set up to use the ComicRN.py script (from the Mylar\mylar-development\sabnzbd folder).
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Problems getting Mylar set up on Windows

Post by evilhero »

I believe that error is because you have a folder specified for the SABnzbd Download directory option within the Mylar configuration. Unless Mylar and SABnzbd reside on different machines, you should just leave the download directory option blank.

Also make sure that you've renamed the autoProcessComics.cfg.sample file to autoProcessComics.cfg and then edited it accordingly (make sure that you have your host specified in the .cfg file is identical to what you provided in the Mylar configuration.
comicbookreader
Posts: 9
Joined: Sun Nov 17, 2013 3:40 pm

Re: Problems getting Mylar set up on Windows

Post by comicbookreader »

Mylar and SABnzbd are on the same machine so I've cleared out the SABnzbd Download Directory and restarted Mylar. The comic was downloaded again but the same syntax error in SABnzbd happened.

I'd gotten a little confused with the autoProcessComics.cfg file and had put in the username/password that I'd set up for SABnzbd. I fixed those settings, restarted Mylar and I'm still getting the following error in SABnzbd after the download is finished:

File "P:\Software\Mylar\mylar-development\sabnzbd\ComicRN.py", line 14
print "No folder supplied - is this being called from SABnzbd or NZBGet?"
^
SyntaxError: invalid syntax

My autoProcessConfig.cfg currently looks like this:
[Mylar]
host=localhost
port=8090
username=
password=
web_root=
ssl=0
comicbookreader
Posts: 9
Joined: Sun Nov 17, 2013 3:40 pm

Re: Problems getting Mylar set up on Windows

Post by comicbookreader »

I think I've got it working now.

I'm getting an error sometimes after adding a title but things seem to be working. If I go back to the home page everything seems to be okay.
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Problems getting Mylar set up on Windows

Post by evilhero »

If you can post the error message that you're getting from the browser, I think I may know what it's involving, but I haven't had a chance to really delve into it.

I thought initially it was due to not having annuals enabled in the config.ini (annuals_on = 1), but it appears to be more to it than just that.
comicbookreader
Posts: 9
Joined: Sun Nov 17, 2013 3:40 pm

Re: Problems getting Mylar set up on Windows

Post by comicbookreader »

Trinity of Sin Pandora:

Error !

TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

22 </thead>
23 <tbody>
24 %for comic in comics:
25 <%
26 myDB = db.DBConnection()
27 issue = myDB.select("SELECT * FROM issues WHERE ComicID=?", [comic['ComicID']])
28 wantedc = myDB.action("SELECT COUNT(*) as count FROM issues WHERE ComicID=? AND Status='Wanted'", [comic['ComicID']]).fetchone()
29 anwantedc = myDB.action("SELECT COUNT(*) as count FROM annuals WHERE ComicID=? AND Status='Wanted'", [comic['ComicID']]).fetchone()
30 annual = myDB.action("SELECT COUNT(*) as count FROM annuals WHERE ComicID=?", [comic['ComicID']]).fetchone()
P:\Software\Mylar\mylar-development\data/interfaces/default/index.html, line 25:
<%
P:\Software\Mylar\mylar-development\data/interfaces/default/base.html, line 78:
${next.body()}
P:\Software\Mylar\mylar-development\mako\runtime.py, line 718:
callable_(context, *args, **kwargs)
P:\Software\Mylar\mylar-development\mako\runtime.py, line 692:
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
P:\Software\Mylar\mylar-development\mako\runtime.py, line 660:
**_kwargs_for_callable(callable_, data))
P:\Software\Mylar\mylar-development\mako\template.py, line 296:
return runtime._render(self, self.callable_, args, data)
P:\Software\Mylar\mylar-development\mylar\webserve.py, line 52:
return template.render(**kwargs)
Post Reply