KenV99 / script.service.kodi.callbacks

Callbacks for Kodi Helix or later
Other
14 stars 20 forks source link

createTask tasksettings = self.settings.tasks[taskkey] KeyError: ('T1',) #3

Open zandegran opened 8 years ago

zandegran commented 8 years ago

`$$$ [kodi.callbacks] - Staring kodi.callbacks ver: 0.9.8.4 00:46:12 612.675293 T:1413391344 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--

## Getting this error after reinstalling

KenV99 commented 8 years ago

Reset settings. Open settings. Hit default. Hit OK. Reinput your settings.

ZenithDK commented 8 years ago

This bit me too - what is going wrong? And could it be handled more gracefully?

KenV99 commented 8 years ago

Given the major changes in the settings.xml, you unfortunately need reset to default and put your settings back in.

More gracefully? Yes, I could spend a couple of hours coding a conversion routine and have to make assumptions of what the user wanted for the new settings. But you know, free app, day job responsibilities...

ZenithDK commented 8 years ago

Fair enough. Failing more gracefully or even putting up a note in the documentation about this would go a long way. I randomly stumbled upon the issue after giving up searching for an answer.

KenV99 commented 8 years ago

See the entry marked 2-27-2016 on the front page of the forum here: http://forum.kodi.tv/showthread.php?tid=256170 And within the forum thread (post #70) here: http://forum.kodi.tv/showthread.php?tid=256170&pid=2261696#pid2261696

ZenithDK commented 8 years ago

I think that is fine, and being a developer myself and all I appreciate that people are expected to read somewhat up on things for themselves. Could this be put on the GitHub page as well? Do you know how to trigger the issue? In that case I wouldn't mind voluntering some time for better error handling of this particular issue.

KenV99 commented 8 years ago

I'll put in the GitHub wiki. Looking at the diff from before the change to the current, there were 57 changed files with 6,247 additions and 2,514 deletions. On that commit I completely rewrote the way that the settings,xml file was generated by creating classes to represent the file and different xml tags and rewrote the generator routines (I may have one of the most complex settings.xml files of any addon and I have not seen other addon developers take this route, but it provides a much better UI and is easier to maintain. Just about everyone else hard codes their settings,xml).

The issue is caused because I changed the naming schema in the tags of the xml. The differences in this particular file are so big that Github won't even display them (1,199 additions, 946 deletions not shown because the diff is too large. Please use a local Git client to view these changes.).

This is an issue that came to light 5 months ago. Everyone that had been following on the forums have moved beyond this and the most recent is now in the official repo. I apologize for any inconvenience that having to input your settings anew has caused you. I would not advise trying to write a conversion routing at this point in time. Feel free to do so if you feel so inclined and create a pull request, but I think that the number of other people looking for such a routine are small.

I will look into the display issue from your issue #4 as soon as I have time. I typically wait until a new release is in Beta before attempting to correct for new problems unless I clearly see them coming from posts on the forum.

ZenithDK commented 8 years ago

I'm not thinking about doing a conversion routine, I was just thinking about catching the exception and pop up a nicer message than what comes out in the Kodi log currently.

I just installed your extension 2 days ago - so it seems like it could be a problem for new users too, albeit maybe only from 17 and onwards?

I think waiting for a beta release is fine, feel free to ignore the issue until we are closer to release to avoid having to redo anything in case they change the API's or something else that will need further changes from you.

KenV99 commented 8 years ago

When you have time, please follow the instructions at the end of the wiki, paying particular attention to step 1.4, and post the link here. This would help me understand why you are getting the error. Posting your userdata/addon_data/script.service.kodi.callbacks/settings.xml file might also be useful.