Scraper Problem While Updating Addon from pre Matrix to Current Version
#1
The following line in api.py creates error that it can't find scraper

"from scraper import (get_shows, get_show_videos,get_weekly_archive_links,get_web_exclusives)"

The addon with this same line works just fine in earlier versions of Kodi but not in Matrix.

the api.py and scraper.py are in the same resources.lib. sub folder

Any help in figuring this out would be much appreciated...

In Gratitude,
Citizen18
Reply
#2
A couple of clues like which addon you're actually talking about and an upload of a debug log (wiki) showing the issue would help, as those would be key bits of information here...
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#3
Hi Darren,

Thank you for your help.  The plugin is DN!  It is a plugin for the free show Democracy Now (https://www.democracynow.org/). 

The original repo is found at:

https://github.com/chakravyu/repository.....chakra.dn

which has the latest version 2.0.2 of the plugin.  This version of the plugin would not install into Matrix 19.5. 

I edited the addon.xml to change the versions of the <requires>  to the following from the old versions that are in the plugin 2.0.2 and added "script.module.kodi-six".  After these edits the DN! addon would install in to Matrix 19.5 and Nexus 20.3.

 <requires>
   <import addon="xbmc.python" version="3.0.0"/>
   <import addon="script.module.kodi-six" />
   <import addon="script.module.xbmcswift2" version="19.0.7"/>
   <import addon="script.module.beautifulsoup4" version="4.12.2" />
  </requires>

Even though the addon will now install it will not run and is creating i think, some python errors.

I have never created a debug log although I used "Log Viewer for Kodi" to see the errors... I would be happy to create a debug log and use paste.kodi.tv if you could kindly explain exactly what you would need and how to provide it.  I am a relative newbie to editing addons although I consider myself a quick learner.

Also, if we get it working I would enjoy sharing the changes with chakravyu/repository.xbmc.chakra if you or someone else can walk me through how to submit it to them.

in Gratitude,
Citizen18
Reply
#4
note - just changing the python version from 2 to 3 in the addon.xml does not actually convert the code itself to python 3
Reply
#5
This I understand and why I am hoping someone will check out the 2.0.2 version as mentioned above and help advise with how to change the addon.py so as to work with the:
"resources.lib.dn.api.py"
and
"resources.lib.dn.scraper.py"
code update from 2 to 3 structure.

in Gratitude,
C18
Reply
#6
That's not an addon I've ever heard of before, and checking the repo you link the last update to the code seems to be 7 years ago.

As noted above, Kodi (and most of the rest of the world) has moved from Python 2 onto Python 3 as 2 is now EOL and has been retired and depreciated.

So either the author of the addon will have to update it, or someone else will have to fork it and take on the task of updating it to the new version of Python (the two are not mutually compatible).

It isn't something the Kodi team will get involved with, but perhaps one of the many addon authors and Python gurus who make up our lovely community might be interested in doing so.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#7
Hi Darren,

Thanks for the response.  I would really like to try to fork and update plugin, but I have no idea where to begin.  Can you suggest any tutorials on how to go about forking and then converting the py 2.0 code to 3.0.  I know all the API information is correct since the plugin still works great on earlier version of Kodi.

in Gratitude,
C18
Reply
#8
I'm personally not a real coder so I'm not the best person to ask.

There is a section in the development area here for the Python 3 migration.
I'll move this thread there and people who frequent that would be better people to give you a response.

Thread moved.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#9
(2024-02-10, 23:36)Citizen18 Wrote: Thanks for the response.  I would really like to try to fork and update plugin, but I have no idea where to begin.  Can you suggest any tutorials on how to go about forking and then converting the py 2.0 code to 3.0.  I know all the API information is correct since the plugin still works great on earlier version of Kodi.

You might want to take a look at this post.  This is the process I have used to migrate a few Kodi addons from Kodi 18 / Python 2.x to Kodi 19+ / Python 3.


Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#10
Hi Darren and jbinkley60,

I ran the script 2to3 and edited - updated the addon.xml file... and now DN! works with 20.3

Thank you guys so much for your help.

I would enjoy sharing the new version but I am not sure how to submit the new version to the repository which was last updated 7 years ago which was version 2.0.2.

Please advice what I should do with the new version 2.0.3 that I have now updated with your help since I am in uncharted territory...

https://github.com/chakravyu/repository.....chakra.dn

in Gratitude,
Citizen18
Reply

Logout Mark Read Team Forum Stats Members Help
Scraper Problem While Updating Addon from pre Matrix to Current Version0