Giter Club home page Giter Club logo

easy4us's Issues

Couldn't find a tree builder with the features you requested: lxml

I'm trying to decode files encoded as IC10.2 PHP 7.2. When I first ran the script I got the following error:

Traceback (most recent call last):
  File "/var/www/webroot/easy4us/main.py", line 8, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'

Then I saw from another issue on here that running "pip install bs4 requests" might help so I did that. But now I get this error.

clearing pageTraceback (most recent call last):
  File "/var/www/webroot/easy4us/main.py", line 159, in <module>
    clear(session)
  File "/var/www/webroot/easy4us/main.py", line 54, in clear
    s = bs4.BeautifulSoup(res.content, features="lxml")
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/jelastic-python311/lib/python3.11/site-packages/bs4/__init__.py", line 248, in __init__
    raise FeatureNotFound(
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?

Am I missing something else? Thanks!

UnicodeDecodeError: 'utf-8' codec can't decode byte

Hello,

When I run the script it gives

UnicodeDecodeError: 'utf-8' codec can't decode byte

error.

python main.py -u **** -p ****** -s encoded -o decoded


descended into encoded
uploading 3 files...Traceback (most recent call last):
  File "main.py", line 188, in <module>
    process_files(session, dir, dest, f)
  File "main.py", line 130, in process_files
    res = upload(session, dir, phpfiles)
  File "main.py", line 96, in upload
    files=upload)
  File "/root/myproject/env/lib/python3.6/site-packages/requests/sessions.py", line 590, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/root/myproject/env/lib/python3.6/site-packages/requests/sessions.py", line 528, in request
    prep = self.prepare_request(req)
  File "/root/myproject/env/lib/python3.6/site-packages/requests/sessions.py", line 466, in prepare_request
    hooks=merge_hooks(request.hooks, self.hooks),
  File "/root/myproject/env/lib/python3.6/site-packages/requests/models.py", line 319, in prepare
    self.prepare_body(data, files, json)
  File "/root/myproject/env/lib/python3.6/site-packages/requests/models.py", line 507, in prepare_body
    (body, content_type) = self._encode_files(files, data)
  File "/root/myproject/env/lib/python3.6/site-packages/requests/models.py", line 159, in _encode_files
    fdata = fp.read()
  File "/usr/lib/python3.6/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbf in position 1709: invalid start byte

Problem when run script

clearing pageTraceback (most recent call last):
File "/home/slaserx/lab/easy4us/main.py", line 159, in
clear(session)
File "/home/slaserx/lab/easy4us/main.py", line 61, in clear
final += "%s&" % urllib.parse.urlencode({i["name"]: i["value"]})
File "/usr/lib/python3/dist-packages/bs4/element.py", line 1486, in getitem
return self.attrs[key]
KeyError: 'value'

Error

Its not working..
No module found error popping up

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.