"TypeError: sendall() argument 1 must be bytes or buffer, not str"
Occurs in Python 3.1 on Windows Vista.
Happens when trying to connection via SOCKS5 to Vidalia.
There are a few ways to do this: writing a version dependent formatting function (which I did), modifying the socksocket sendall member function in a version dependent way at load time, or have a version conditional branch at execution time.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Certainly. It's great to see that someone has taken over this project. I tried contacting Dan Haim last year offering to do just that, but I received no response and just made the modifications to my own code base.
I think it's worth mentioning, bytes will probably need to be called in struct.unpack in __negotioatesocks4 as well.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't think this module is supposed to be compatible with python 3 in the first place...
It could be, by simply adding a .encode() call before issuing a sends.
Wouldn't that break compatibility with python 2? (I'm not all that familiar with python 3 yet)
Not necessarily.
If you look at my source tree for PyLoris, I made a few minor modifications to this library in order to support both Python 2.x and 3.x: http://pyloris.svn.sourceforge.net/viewvc/pyloris/tags/pyloris-2.3/socks.py?revision=60&view=markup
There are a few ways to do this: writing a version dependent formatting function (which I did), modifying the socksocket sendall member function in a version dependent way at load time, or have a version conditional branch at execution time.
Interesting! Do you mind if I merge your fix here? http://code.google.com/p/socksipy-branch
Certainly. It's great to see that someone has taken over this project. I tried contacting Dan Haim last year offering to do just that, but I received no response and just made the modifications to my own code base.
I think it's worth mentioning, bytes will probably need to be called in struct.unpack in __negotioatesocks4 as well.