Skip to content

requests Library Bug in Lastest Version of ironPython #758

@UnknownSourceCode

Description

@UnknownSourceCode
  • Im running the latest version.
  • Imreporting to the correct repository
  • I Did you perform a cursory search and Alot Have Same Probleme without Solution

Description

REQUESTS Bug in Lastest Version of ironPython
Bug That Doesn't Allow you Use Requests Library and in IronPython (TypeError: not expecting type '<type 'bytes'>')
TO get the Bug :
a. To Get Ready:

  1. ipy -m pip install requests
  2. ipy
    b. after Getting Into Interpreter:
  3. import requests
  4. session = requests.Session()
  5. request = session.get('https://google.com')

i thought Honestly that he will Do the Request and Return Infos when i prompt for Them .text , .status_code, .content
but this Happend:

  File "C:\Users\Administrator\AppData\Roaming\Python\IronPython27\site-packages\requests\sessions.py", line 590, in post
  File "C:\Users\Administrator\AppData\Roaming\Python\IronPython27\site-packages\requests\sessions.py", line 528, in request
  File "C:\Users\Administrator\AppData\Roaming\Python\IronPython27\site-packages\requests\sessions.py", line 456, in prepare_request
  File "C:\Users\Administrator\AppData\Roaming\Python\IronPython27\site-packages\requests\models.py", line 316, in prepare
  File "C:\Users\Administrator\AppData\Roaming\Python\IronPython27\site-packages\requests\models.py", line 382, in prepare_url
  File "C:\Users\Administrator\AppData\Roaming\Python\IronPython27\site-packages\urllib3\util\url.py", line 381, in parse_url
  File "C:\Users\Administrator\AppData\Roaming\Python\IronPython27\site-packages\urllib3\util\url.py", line 296, in _normalize_host
  File "C:\Users\Administrator\AppData\Roaming\Python\IronPython27\site-packages\urllib3\packages\six.py", line 951, in ensure_str
TypeError: not expecting type '<type 'bytes'>'

Versions

IronPython 2.7.11 (2.7.11.1000)
[.NETFramework,Version=v4.5 on .NET Framework 4.8.4300.0 (64-bit)]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions