amnong / easywebdav

A WebDAV Client in Python
http://pypi.python.org/pypi/easywebdav/
ISC License
207 stars 113 forks source link

NameError: global name 'basestring' is not defined (python 3) #26

Open minami-o opened 10 years ago

minami-o commented 10 years ago

Hey there, Nice work you have done, thanks! I just came across an error while trying to download/upload files with my python3.3 install:

NameError: global name 'basestring' is not defined

After a quick web research, I found the solution mentioned here to work just fine. I added the lines right after the import lines in client.py.

SvenFestersen commented 9 years ago

I also would really like to use you library with Python3. As @minami-o mentioned, adding

try:
    basestring
except NameError:
    basestring = str

after all the imports should be sufficient.

The solution in pull request #28 should also work.

wsw70 commented 9 years ago

+1: same problem, same solutions

jcea commented 8 years ago

Same problem here. Could you possibly do a new release, please?

charreleramis commented 6 years ago

In python 3 just add basestring = str