Sandmann79 / xbmc

Prime Video Addon for Kodi Media Center
https://forum.kodi.tv/showthread.php?tid=349255
GNU General Public License v3.0
753 stars 191 forks source link

"Cannot execute CSS selectors because the soupsieve package is not installed." #352

Closed LichtiMC closed 4 years ago

LichtiMC commented 4 years ago

Amazon Account (select one)

System Setup (please provide the following information):

Upload Logs

2019-11-16 00:31:37.414 T:3163603840  NOTICE: [Amazon VOD] Service: Proxy server started
2019-11-16 00:31:37.415 T:3163603840  NOTICE: [Amazon VOD] Service started
2019-11-16 00:31:48.884 T:3701711744   ERROR: CCurlFile::Stat - Failed: SSL peer certificate or SSH remote key was not OK(60) for http://supremacy.org.uk/zip/plugin/script.module.pyxbmct/icon.png
2019-11-16 00:32:02.629 T:3155211136   ERROR: Previous line repeats 1 times.
2019-11-16 00:32:02.630 T:3155211136   ERROR: /storage/.kodi/addons/script.module.beautifulsoup4/lib/bs4/element.py:16: UserWarning: The soupsieve package is not installed. CSS selectors cannot be used.
                                              'The soupsieve package is not installed. CSS selectors cannot be used.'
2019-11-16 00:32:03.349 T:3155211136  NOTICE: [Amazon VOD] Switching UserAgent
2019-11-16 00:32:03.351 T:3155211136  NOTICE: [Amazon VOD] Loading list of common UserAgents
2019-11-16 00:32:03.359 T:3155211136  NOTICE: [Amazon VOD] getURL: http://www.skydubh.com/pub/useragents.json
2019-11-16 00:32:03.498 T:3155211136  NOTICE: [Amazon VOD] Using UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Safari/605.1.15
2019-11-16 00:32:03.643 T:3155211136  NOTICE: [Amazon VOD] Retrieve territoral config
2019-11-16 00:32:03.715 T:3155211136  NOTICE: [Amazon VOD] getURL: https://na.api.amazonvideo.com/cdp/usage/v2/GetAppStartupConfig?deviceTypeID=A28RQHJKHM2A2W&deviceID=360421879c84cd9ef433903f25dc720c77e6b5f957461de73c6f6872&firmware=1&version=1&format=json
2019-11-16 00:32:18.044 T:3155211136  NOTICE: [Amazon VOD] Connect to SignIn Page 5 attempts left
2019-11-16 00:32:22.442 T:3155211136   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.NotImplementedError'>
                                            Error Contents: Cannot execute CSS selectors because the soupsieve package is not installed.
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/plugin.video.amazon-test/default.py", line 5, in <module>
                                                EntryPoint()
                                              File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/startup.py", line 95, in EntryPoint
                                                exec('{}()'.format(mode))
                                              File "<string>", line 1, in <module>
                                              File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/network.py", line 467, in LogIn
                                                form = br.select_form('form[name="signIn"]')
                                              File "/storage/.kodi/addons/script.module.mechanicalsoup/lib/mechanicalsoup/stateful_browser.py", line 202, in select_form
                                                limit=nr + 1)
                                              File "/storage/.kodi/addons/script.module.beautifulsoup4/lib/bs4/element.py", line 1373, in select
                                                "Cannot execute CSS selectors because the soupsieve package is not installed."
                                            NotImplementedError: Cannot execute CSS selectors because the soupsieve package is not installed.
                                            -->End of Python script error report<--
2019-11-16 00:32:22.795 T:3155211136 WARNING: CPythonInvoker(13, /storage/.kodi/addons/plugin.video.amazon-test/default.py): the python script "/storage/.kodi/addons/plugin.video.amazon-test/default.py" has left several classes in memory that we couldn't clean up. The classes include: N9XBMCAddon7xbmcgui6DialogE,N9XBMCAddon9xbmcaddon5AddonE,N14PythonBindings31XBMCAddon_xbmc_Monitor_DirectorE

After confirming password the above message appears in log.

Varstahl commented 4 years ago

Hmm, where are you getting the beautifulsoup4 module from? The one in Kodi's repository have soupsieve embedded in it, it's impossible to get this kind of errors. Can you try downloading it from the official repos? Maybe you have a different version installed from another repository.

LichtiMC commented 4 years ago

I installed from the official repo. I even deleted the addon-folder of beautifulsoup4 via ssh and let the repository reinstall it... But I'll try to install the downloaded zip file, thanks!

Varstahl commented 4 years ago

I have it installed on a Leia 18.4 myself that I used while developing the python 3 support, let me know if downloading it from the repo works. If it doesn't I'll look into it, this is pretty strange.

LichtiMC commented 4 years ago

You were right, apparently there was some other version of beautifulsoup4 installed (even if the version nr. was the same).

Thanks for the help!

Varstahl commented 4 years ago

No problems, glad you got it working.

silvatyrant commented 3 years ago

Just to further explain the issue and resolution...

I've just experienced this issue recently on v0.9.1. It seems when BeautifulSoup (I went from 4.6.2 to 4.9.3) gets updated, for some reason the soapsieve module cannot be detected. I did the following to resolve: 1) Uninstall BeautifulSoup by going to Add-ons >> My add-ons >> Video add-ons >> Amazon VOD >>Dependencies >> BeautifulSoup4 (check version here - if != 4.6.2, then proceed) >> Uninstall - P.S. It might complain that BeautifulSoup is a dependency for other add-ons. If so, you'll have to uninstall those first (and reinstall after step 4). 2) SSH to your Kodi host and download the correct version from the Leia repo - P.S. Note where you've downloaded the file to for installing via Kodi's UI. curl -vOL https://mirrors.kodi.tv/addons/leia/script.module.beautifulsoup4/script.module.beautifulsoup4-4.6.2.zip 3) Go to Add-ons >> Install from zip file >> (browse to the location the module's been saved to and install) 4) $$$ 5) OPTIONAL - Reinstall add-ons previously uninstalled due to a dependency on BeautifulSoap. 6) BONUS OPTIONAL - Probably best to disable auto-updates for BeautifulSoup too. Go to Add-ons >> Available updates >> BeautifulSoup >> Auto-update (toggle to disable)

I hope this is helpful to others.

jaum20 commented 3 years ago

Thank you, @silvatyrant. Also, there is no need to uninstall beautifulsoup4, just install the older version from zip file that it will be downgraded.

solarjoe commented 3 years ago

I fixed this issue by just Add-ons >> My add-ons >> Video add-ons >> Amazon VOD >>Dependencies >> BeautifulSoup4 (4.6.2) >> Update >> Select 4.9.3 >>

Now the dependencies list shows "BeautifulSoup4 (4.6.2) installed", which is incorrect now, but when I select it, the details state 4.9.3 installed. Maybe I need to restart, but it works now.