Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

NameError: name 'split_first' is not defined #373

Closed
zbxhzp opened this issue Jul 20, 2023 · 0 comments
Closed

NameError: name 'split_first' is not defined #373

zbxhzp opened this issue Jul 20, 2023 · 0 comments

Comments

@zbxhzp
Copy link

zbxhzp commented Jul 20, 2023

pip3 install pocsuite3
Python 3.11.4 (main, Jun 20 2023, 17:23:00) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pocsuite3.api import requests
>>> requests.get("http://baidu.com")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/homebrew/lib/python3.11/site-packages/requests/api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/pocsuite3/lib/request/patch/hook_request.py", line 63, in session_request
    prep = self.prepare_request(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/requests/sessions.py", line 486, in prepare_request
    p.prepare(
  File "/opt/homebrew/lib/python3.11/site-packages/requests/models.py", line 368, in prepare
    self.prepare_url(url, params)
  File "/opt/homebrew/lib/python3.11/site-packages/requests/models.py", line 434, in prepare_url
    scheme, auth, host, port, path, query, fragment = parse_url(url)
                                                      ^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/pocsuite3/lib/request/patch/hook_urllib3_parse_url.py", line 191, in patched_parse_url
    url, path_, delim = split_first(url, ['/', '?', '#'])
                        ^^^^^^^^^^^
NameError: name 'split_first' is not defined
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants