COUR4G3 / proxy-negotiate

HTTP Negotiate proxy authentication support for applications.
MIT License
6 stars 5 forks source link

'bytes' has no attribute 'encode' #3

Open nicolae-stihhi-db opened 1 year ago

nicolae-stihhi-db commented 1 year ago

Hi, I'm getting this error, which I assume it's because of Python breaking changes. Don't want anyone else to fix it for me, just to put it here.

PS: thanks for working to put this repo together.

Cloning into 'myrepo'...
Traceback (most recent call last):
  File "/Users/nicolaes/.pyenv/versions/3.11.0/bin/nc-negotiate", line 4, in <module>
    __import__('pkg_resources').run_script('Proxy-Negotiate==1.0.0', 'nc-negotiate')
  File "/Users/nicolaes/.pyenv/versions/3.11.0/lib/python3.11/site-packages/pkg_resources/__init__.py", line 672, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/Users/nicolaes/.pyenv/versions/3.11.0/lib/python3.11/site-packages/pkg_resources/__init__.py", line 1479, in run_script
    exec(script_code, namespace, namespace)
  File "/Users/nicolaes/.pyenv/versions/3.11.0/lib/python3.11/site-packages/Proxy_Negotiate-1.0.0-py3.11.egg/EGG-INFO/scripts/nc-negotiate", line 37, in <module>
  File "/Users/nicolaes/.pyenv/versions/3.11.0/lib/python3.11/site-packages/Proxy_Negotiate-1.0.0-py3.11.egg/proxy_negotiate.py", line 112, in netcat
AttributeError: 'bytes' object has no attribute 'encode'. Did you mean: 'decode'?
kex_exchange_identification: Connection closed by remote host
Connection closed by UNKNOWN port 65535
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.
COUR4G3 commented 1 year ago

Thanks, I must've forgotten one or two encodes or decodes when migrating this all to Python 3.

If you submit a PR I'll merge it and make a new release for PyPi.