Welcome, Guest
Python Scripts for ComicRack

TOPIC: Can someone tell me what I am doing wrong?

Can someone tell me what I am doing wrong? 6 years 10 months ago #11114

  • Zeriman
  • Zeriman's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
Hi everyone. I am a total Newb when it comes to scripting, but I modified a few scripts to suit my purposes and after a bit of struggle got them them to work. Now I am trying something different and I thought this would work, but I can't figure out why I am getting this "Exception has been thrown by the target of invocation" error.

The idea of the script is to look at the selected books and if the title is recognized to add the writer and Genre fields. Right now I just have one title entered but if I can get the script to work I would add more titles to the script. Ultimately I would like to create some user interface to add in the data and have it held in a data field or something like that, but right now I can't even get this basic script to work.

If anyone could take a look at this script and tell me where I am screwing up I would appreciate it.

Paul
AddData.rar

File Attachment:

File Name: AddData.zip
File Size:2 KB
Last Edit: 6 years 10 months ago by Zeriman. Reason: Add Zip file
The administrator has disabled public write access.

Re: Can someone tell me what I am doing wrong? 6 years 10 months ago #11119

  • cbanack
  • cbanack's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1318
  • Thank you received: 503
  • Karma: 181
Are you running ComicRack with the -dso and -ssc options? That way you'll have a console to let you see more details about your errors.

You'll want to wrap all your code in a proper "try: except:" block, too, so that any python errors that it causes are captured, and then you can use "print" and/or "sys.exc_info()" to write some details about the captured error to the console I mentioned above.

Get some good error handling set up in your code before you try to write too much; it's very hard to develop even simple software without detailed information about the bugs you write! :cheer:


Also, have you checked out the Comic Vine Scraper script? It probably does some of what you are looking for, though it does NOT handle manga, which I can see you're trying to do (based on the code that you attached.)
Last Edit: 6 years 10 months ago by cbanack.
The administrator has disabled public write access.

Re: Can someone tell me what I am doing wrong? 6 years 10 months ago #11132

  • Zeriman
  • Zeriman's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
Thank you. That was very helpful. I have finally got it to work.

Thanks for the Comic Vine suggestion, but my entire collection is Manga. It would be great if there was a Manga Updates version.

Paul
The administrator has disabled public write access.
Time to create page: 0.168 seconds

Who's Online

We have 209 guests and 10 members online