Error Adding comic

Post any problems / bugs / issues that are Mylar-related in here.
Post Reply
AtD
Posts: 1
Joined: Sun Dec 22, 2013 4:39 pm

Error Adding comic

Post by AtD »

I get an error when I try adding a comic. I've checked to make sure my comics director is specified in my config file, but I'm still getting this (I edited out my name):

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 if annuals_on:
30 anwantedc = myDB.action("SELECT COUNT(*) as count FROM annuals WHERE ComicID=? AND Status='Wanted'", [comic['ComicID']]).fetchone()
C:\Users\****\Downloads\mylar-master\data/interfaces/default/index.html, line 25:
<%
C:\Users\****\Downloads\mylar-master\data/interfaces/default/base.html, line 78:
${next.body()}
C:\Users\****\Downloads\mylar-master\mako\runtime.py, line 718:
callable_(context, *args, **kwargs)
C:\Users\****\Downloads\mylar-master\mako\runtime.py, line 692:
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
C:\Users\****\Downloads\mylar-master\mako\runtime.py, line 660:
**_kwargs_for_callable(callable_, data))
C:\Users\*****\Downloads\mylar-master\mako\template.py, line 296:
return runtime._render(self, self.callable_, args, data)
C:\Users\****\Downloads\mylar-master\mylar\webserve.py, line 52:
return template.render(**kwargs)
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Error Adding comic

Post by evilhero »

Are you running Master or Development build of Mylar? (I'm going to guess Master, but I could be wrong).I believe this issue was fixed in the development build, but has yet to flip over to the Master.

Do you have annuals_on = 1 within your config.ini ? (Annuals_on turns on the annuals module which appears at the bottom of the comic details page when the series in question has annuals). By default it's set to 0, which may be causing the issue.

Can I ask what series it is that you were trying to add when you got the error ? Is it happening to every comic you try to add or just this particular series ?
mobbmuzick
Posts: 2
Joined: Wed Feb 12, 2014 10:29 pm

Re: Error Adding comic

Post by mobbmuzick »

I'm pretty much getting the same error when trying to add any comic. I'm using dev not master and I haven't changed annuals_on in the config.ini file


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 if annuals_on:
30 anwantedc = myDB.action("SELECT COUNT(*) as count FROM annuals WHERE ComicID=? AND Status='Wanted'", [comic['ComicID']]).fetchone()
I:\mylar-development\data/interfaces/default/index.html, line 25:
<%
I:\mylar-development\data/interfaces/default/base.html, line 78:
${next.body()}
I:\mylar-development\mako\runtime.py, line 718:
callable_(context, *args, **kwargs)
I:\mylar-development\mako\runtime.py, line 692:
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
I:\mylar-development\mako\runtime.py, line 660:
**_kwargs_for_callable(callable_, data))
I:\mylar-development\mako\template.py, line 296:
return runtime._render(self, self.callable_, args, data)
I:\mylar-development\mylar\webserve.py, line 52:
return template.render(**kwargs)
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Error Adding comic

Post by evilhero »

For whatever reason, I'm unable to duplicate this - I'm leaning towards the fact that it's running on Windows and there's some really weird lock or process that's in use and it won't release it. I'll try running through it on a windows machine and see if I can duplicate it.

In the meantime, I believe it has something to do with the annuals portion, and not having it enabled may be part of the issue. So try this to see if anything gets resolved.
- Shutdown Mylar.
- Edit your config.ini file and change the annuals_on = 0 to annuals_on = 1
- Restart Mylar.
- Try re-adding the series that you were having problems with.

It may also be a problem with the series you're trying to add (ie. one of the issues has a non-numeric character in it and is causing Mylar to halt). The series should get added even if that error appears (the adding module runs independently of the GUI, except when accessing the db so it should be able to complete the add still).

A restart of Mylar will clear the error and you can resume operations, but if you're getting the error still after a reboot then it's obviously something persistent that's happening.
mobbmuzick
Posts: 2
Joined: Wed Feb 12, 2014 10:29 pm

Re: Error Adding comic

Post by mobbmuzick »

Thanks. I'll let you know what happens.
Post Reply