jmcarp / robobrowser

BSD 3-Clause "New" or "Revised" License
3.7k stars 337 forks source link

pls fix the 'werkzeug' library #96

Open H3wastooshort opened 4 years ago

H3wastooshort commented 4 years ago
  File "/usr/local/lib/python3.6/dist-packages/robobrowser/browser.py", line 8, in <module>
    from werkzeug import cached_property
ImportError: cannot import name 'cached_property'

Just commit #97 to fix this

bblue commented 4 years ago

bump

BenSchweikert commented 4 years ago

bump. Please fix / commit the fix.

andersonneo67 commented 4 years ago

I have fixed it and it is available for the pip install with the package name of robobro which would install robobrowser. Would be removing it once the owner commits the changes to the original package robobrowser.

haalrubaye commented 4 years ago

@andersonneo67 hey, I've tried using your fix and it still gives me the same error :/ . Does its source code come from your robobrowser directory? Because upon inspection the browser.py line 8 from werkzeug import cached_property hasn't been changed into from werkzeug.utils import cached_property

andersonneo67 commented 4 years ago

@andersonneo67 hey, I've tried using your fix and it still gives me the same error :/ . Does its source code come from your robobrowser directory? Because upon inspection the browser.py line 8 from werkzeug import cached_property hasn't been changed into from werkzeug.utils import cached_property

you could try uninstalling the already installed robobrowser 1 step : pip uninstall robobrowser ,other 2 step: pip install robobro

Robobro is same as the robobrowser with the werkzeug fix

This should do the update and then you can import the package the usual way

nielsbuus commented 3 years ago

@andersonneo67 The owner seems to have abandoned this project. Have you considered forking and maintaining it? I like this library and it would be nice to have a new "official" repository that can accept fixes in case something breaks.

bizzyvinci commented 3 years ago

Another solution is to downgrade werkzeug from version >=1 to version <1.

pip uninstall werkzeug pip install werkzeug==0.16.1

The reason for the import error is because werkzeug new version is not backward compatible.

Grieze commented 4 months ago

Another solution is to downgrade werkzeug from version >=1 to version <1.

pip uninstall werkzeug pip install werkzeug==0.16.1

The reason for the import error is because werkzeug new version is not backward compatible.

This is a solid fix and useful, though I would not use this library going forward outside of quick scripts which you won't heavily rely upon.