Kodi Community Forum

Full Version: mechanize.Browser
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
greetings,

I was using this command:
Code:
mechanize.Browser()
for an addon.
with the changes in Gotham, this module seems to be deprecated.

i get this error:
Code:
-->Python Interpreter Initialized<--
22:39:13 T:139855155222400   ERROR: Control 50 in window 10025 has been asked to focus, but it can't
22:39:13 T:139853379393280   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ImportError'>
                                            Error Contents: No module named mechanize
                                            Traceback (most recent call last):
                                              File "/home/xbmc/.xbmc/addons/plugin.video.espn3/default.py", line 9, in <module>
                                                import mechanize
                                            ImportError: No module named mechanize
                                            -->End of Python script error report<--

is there another command I can/ should be using for this action?

thanks in advance.
(2013-10-14, 17:00)locomot1f Wrote: [ -> ]greetings,

I was using this command:
Code:
mechanize.Browser()
for an addon.
with the changes in Gotham, this module seems to be deprecated.

which version of the mechanize module are you using?
0.2.5

would it be possible to just change the python version to 2.0?

edit -- yup, that worked. got it working again...

i do have a follow up.
I'm trying to get the Hulu plugin Gotham ready.

I'm getting errors about crypto.cipher.cbc

pastebin -- http://pastebin.com/x2dbQGEB

not as easy as changing the python version.

using:
version="1.2.6.1"
provider-name="cryptopy.sourceforge.net">
(2013-10-15, 16:26)locomot1f Wrote: [ -> ]0.2.5

would it be possible to just change the python version to 2.0?

edit -- yup, that worked. got it working again...

we'll fix that up in our repo ;-)

(2013-10-15, 16:26)locomot1f Wrote: [ -> ]i do have a follow up.
I'm trying to get the Hulu plugin Gotham ready.

I'm getting errors about crypto.cipher.cbc

pastebin -- http://pastebin.com/x2dbQGEB

not as easy as changing the python version.

using:
version="1.2.6.1"
provider-name="cryptopy.sourceforge.net">

you're sure it's "1.2.6.1" ?
we've never used a x.x.x.x version scheme in our repo.
also, there's no crypto module in our frodo repo,
so makes me wonder where you got it from.
it's a module that comes with the Hulu addon.

i found it weird too, as i went to the sourceforge.net site, and the latest is 1.2.5.

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.module.cryptopy"
       name="CryptoPy"
       version="1.2.6.1"
       provider-name="cryptopy.sourceforge.net">
  <requires>
    <import addon="xbmc.python" version="2.0"/>
  </requires>
  <extension point="xbmc.python.module"
             library="lib" />
  <extension point="xbmc.addon.metadata">
    <platform>all</platform>
  </extension>
</addon>

i told MoneyMaker -- i think he's maintaining it... so i think he's on it now.

thanks anyway.
No it's not as easy as I test it. Damn it this wasn't supposed to get in the offical repo, so many people are having troubles now. Good job you've done moneymaker.
(2013-10-15, 16:26)locomot1f Wrote: [ -> ]0.2.5

would it be possible to just change the python version to 2.0?

edit -- yup, that worked. got it working again...

i do have a follow up.
I'm trying to get the Hulu plugin Gotham ready.

I'm getting errors about crypto.cipher.cbc

pastebin -- http://pastebin.com/x2dbQGEB

not as easy as changing the python version.

using:
version="1.2.6.1"
provider-name="cryptopy.sourceforge.net">


I'm trying to get a different plugin up and running in Gotham, and am running into the same mechanize module error that you were getting. I tried changing the Python version to 2.0, and still am getting the same result. Can you think of anything else I can do? Thanks!

Code:
Error Type: <type 'exceptions.ImportError'>
Error Contents: No module named mechanize
Traceback (most recent call last):
File "C:\Users\Bedroom\AppData\Roaming\XBMC\addons\plugin.program.piratebay\default.py", line 13, in <module>
from webviewer import webviewer
File "C:\Users\Bedroom\AppData\Roaming\XBMC\addons\script.web.viewer\lib\webviewer\webviewer.py", line 5, in <module>
import mechanize, threading  # @UnresolvedImport
ImportError: No module named mechanize
-->End of Python script error report<--