I'm using a Twitter API called Tweepy. It has been working fine, then I rebooted the server and now I'm getting this:
>>> import tweepy Traceback (most recent call last): File "<stdin>", line 1, in <module> File "tweepy/__init__.py", line 17, in <module> from tweepy.streaming import Stream, StreamListener File "tweepy/streaming.py", line 16, in <module> json = import_simplejson() File "tweepy/utils.py", line 83, in import_simplejson import simplejson as json File "build/bdist.linux-i686/egg/simplejson/__init__.py", line 111, in <module>
File "build/bdist.linux-i686/egg/simplejson/decoder.py", line 29, in <module> File "build/bdist.linux-i686/egg/simplejson/decoder.py", line 21, in _floatconstants LookupError: unknown encoding: hex
I tried this too:
Quote
from encodings import hex_codec
But it didn't help.
Any ideas? I haven't changed anything and it just stopped working.
[EDIT] Tracked this down to simplejson.
>>> import simplejson Traceback (most recent call last): File "<stdin>", line 1, in <module> File "build/bdist.linux-i686/egg/simplejson/__init__.py", line 111, in <module>
File "build/bdist.linux-i686/egg/simplejson/decoder.py", line 29, in <module> File "build/bdist.linux-i686/egg/simplejson/decoder.py", line 21, in _floatconstants LookupError: unknown encoding: hex
03 Nov, 2011, David Haley wrote in the 2nd comment:
Votes: 0
You might need to upgrade simplejson or something.
$ python Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import simplejson >>> import sys >>> sys.modules['simplejson'].__version__ '2.1.1' >>> $
I tried this too:
But it didn't help.
Any ideas? I haven't changed anything and it just stopped working.
[EDIT] Tracked this down to simplejson.