colonelpanic8 / okcupyd

A Library that enables programmatic interaction with okcupid.com, using okcupid.com's private okcupid JSON API and html scraping when necessary.
MIT License
110 stars 18 forks source link

UnicodeDecodeError with accentuated username #47

Open hista opened 9 years ago

hista commented 9 years ago

There is an issue with accentued usernames:

/usr/local/lib/python2.7/dist-packages/okcupyd/session.py:68: UnicodeWarning: Unicode unequal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  if log_in_name.lower() != username.lower():
Traceback (most recent call last):
  File "/usr/local/bin/okcupyd", line 9, in <module>
    load_entry_point('okcupyd==0.9.0', 'console_scripts', 'okcupyd')()
  File "/usr/local/lib/python2.7/dist-packages/okcupyd/__init__.py", line 32, in interactive
    u = User()
  File "/usr/local/lib/python2.7/dist-packages/okcupyd/user.py", line 53, in __init__
    self._session = session or Session.login()
  File "/usr/local/lib/python2.7/dist-packages/okcupyd/session.py", line 45, in login
    session.do_login(username, password)
  File "/usr/local/lib/python2.7/dist-packages/okcupyd/session.py", line 70, in do_login
    u'got {1}'.format(username, log_in_name))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4: ordinal not in range(128)
colonelpanic8 commented 9 years ago

Sorry for the delay @hista. I'm taking a look at this now.

hista commented 9 years ago

Hi Ivan,

Is this issue solved now?

Best regards

colonelpanic8 commented 9 years ago

I think I did fix it but I haven't pushed it yet. Testing is sort of a pain for me right now because my ip address was blocked. Let me take a look.

hista commented 9 years ago

Hi Ivan,

Few months later is it fixed? I can of course test your fix if you couldn't. Let me know!

Le 27/04/2015 03:10, IvanMalison a écrit :

I think I did fix it but I haven't pushed it yet. Testing is sort of a pain for me right now because my ip address was blocked. Let me take a look.

— Reply to this email directly or view it on GitHub https://github.com/IvanMalison/okcupyd/issues/47#issuecomment-96455431.

colonelpanic8 commented 9 years ago

I think I did SOME stuff to fix it, but ran in to an issue making in python2 and 3 compatible. I need to take a look at some other issues in the codebase this weekend so I can take a look at this again too.

hista commented 9 years ago

Thanks Ivan, please let me know when I can test your fix then.

Le 03/07/2015 07:32, IvanMalison a écrit :

I think I did SOME stuff to fix it, but ran in to an issue making in python2 and 3 compatible. I need to take a look at some other issues in the codebase this weekend so I can take a look at this again too.

— Reply to this email directly or view it on GitHub https://github.com/IvanMalison/okcupyd/issues/47#issuecomment-118240539.

hista commented 9 years ago

Hi Ivan

Could you solve it this weekend?

Best regards

Le 03/07/2015 07:32, IvanMalison a écrit :

I think I did SOME stuff to fix it, but ran in to an issue making in python2 and 3 compatible. I need to take a look at some other issues in the codebase this weekend so I can take a look at this again too.

— Reply to this email directly or view it on GitHub https://github.com/IvanMalison/okcupyd/issues/47#issuecomment-118240539.

colonelpanic8 commented 9 years ago

the problem is that i cant test from my home ip, which makes things pretty annoying right now (have to run everything on aws...