szarroug3 / X-Ray_Calibre_Plugin

X-Ray Creator plugin for Calibre
http://www.mobileread.com/forums/showthread.php?t=273189
GNU General Public License v3.0
57 stars 12 forks source link

AttributeError:'NoneType' object has no attribute 'split' #32

Closed redebs closed 8 years ago

redebs commented 8 years ago

calibre, version 2.53.0 ERROR: Unhandled exception: AttributeError:'NoneType' object has no attribute 'split'

calibre 2.53 [64bit] embedded-python: True is64bit: True Windows-7-6.1.7601-SP1 Windows ('64bit', 'WindowsPE') ('Windows', '7', '6.1.7601') Python 2.7.9 Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free') Successfully initialized third party plugins: iOS reader applications && Save To Format && Hyphenate This! && Annotations && Reading List && QuarantineAndScrub && X-Ray Creator && APNX Generator && Generate Cover && Count Pages && Manage Series && Goodreads && Clean Metadata && Modify ePub && Prettify Cover && Goodreads Sync && Find Duplicates && Quality Check Traceback (most recent call last): File "calibre_plugins.xray_creator.ui", line 93, in book_config File "calibre_plugins.xray_creator.book_config", line 51, in init File "calibre_plugins.xray_creator.book_config", line 306, in init File "calibre_plugins.xray_creator.book_config", line 431, in update_aliases File "calibre_plugins.xray_creator.lib.shelfari_parser", line 14, in init AttributeError: 'NoneType' object has no attribute 'split'

I got this error on a few azw3 and mobi books.

stoduk commented 8 years ago

What version of the plugin are you using?

Did this work for any books?

Can you send the book_settings.json files for some of the books that failed? If you can also send the books that could help.. [to find the files: right click on book in Calibre, "Open containing folder", it will be there]

For Samreen: I think this is probably just a case of shelfari not knowing about the book (based first on ASIN and then title/author), but then tripping over on the error handling (self.shelfari_url != "" is meant to block this, but url will be None. Either search_shelfari should return "" instead, or the check should remove != "").

redebs commented 8 years ago

Hi, currently using 2.1.1.

Out of the 15 I tried, 4 books had this error.

Github won't let me attach the books and the book_settings.json files so I uploaded via mediafire: http://www.mediafire.com/download/udms7250tc7c73b/xray_error.zip

Also, if it matters, I get the 'no hard disk' error every time but it eventually works after clicking 'Try again' four times and "Books Failed: ..... AZW3: The book is not on the device."; I would have to copy the .asc files manually to my kindle.

stoduk commented 8 years ago

OK, thanks. I can see the problems: 1) we are doing a search by ASIN (which often works) but incorrectly throwing that result away and doing the search by title/author.

2) we are doing a search by title/author and if it works all is well, but if it doesn't then we hit the exception you saw.

So the fixes are:

@redebs - if you can, delete that upload. I don't want you getting in trouble for copyright nonsense. Also - what is the "no hard disk" error you mentioned. If this problem already tracked by an issue on github (or being discussed on the forum thread)?

szarroug3 commented 8 years ago

Thanks for reporting this @redebs and thanks for handling it @stoduk.

redebs commented 8 years ago

@stoduk Thanks, I've already deleted it.

I think the hard disk error I'm talking about has already been mentioned in the forums. This is the error I get whenever I use the plugin:

There is no disk in the drive. Please insert a disk into \Device\Harddisk1\DR1

I found that clicking 'Try Again' or 'Continue' four times and it works.

@szarroug3 awesome plugin you've created man.

szarroug3 commented 8 years ago

@redebs Thanks! :)

@stoduk Looks like this is a Linux/Mac issue so can you look into it? My first thought would be that the computer hasn't recognized the device has been plugged in yet since it eventually works. That is unless it's always exactly 4 times.

On Tue, May 31, 2016 at 10:03 AM redebs notifications@github.com wrote:

@stoduk https://github.com/stoduk Thanks, I've already deleted it.

I think the hard disk error I'm talking about has already been mentioned in the forums. This is the error I get whenever I use the plugin:

There is no disk in the drive. Please insert a disk into \Device\Harddisk1\DR1

I found that clicking 'Try Again' or 'Continue' four times and it works.

@szarroug3 https://github.com/szarroug3 awesome plugin you've created man.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/szarroug3/X-Ray_Calibre_Plugin/issues/32#issuecomment-222717199, or mute the thread https://github.com/notifications/unsubscribe/AIEjUbM60gN5Ih-XbENmwc5h3Uk-lNyfks5qHE3dgaJpZM4IqRuz .

stoduk commented 8 years ago

@redebs - can you raise a new issue for the hard drive problem? We can discuss it there.. Can you describe exactly what you are doing when you hit the problem, and what your Calibre setup is (most importantly: whether you are running it on a removeable drive)?

redebs commented 8 years ago

@stoduk here is the new issue i raised for the hard disk problem: https://github.com/szarroug3/X-Ray_Calibre_Plugin/issues/34

stoduk commented 8 years ago

@redebs - fix is done, I'll let @szarroug3 check it over and release it (perhaps with the windows drive fix, if that gets sorted). If you want to try it then grab the zip file from https://github.com/stoduk/X-Ray_Calibre_Plugin (green "Clone or download" button, select "Download ZIP". You'll probably need to uninstall the old version of the plugin manually, as the plugin version number won't be incremented yet).

FWIW your books aren't well sorted on shelfari - for some it worked by putting in the ASIN for the non-kindle versions of the book, for others it worked but resulted in no aliases found (which just means shelfari has no decent data for the book).

szarroug3 commented 8 years ago

I'm going to merge this and release it. We can put the hard disk fix in 2.1.3 since I can't seem to figure it out just yet.