carolinux / gdata-python-client

Automatically exported from code.google.com/p/gdata-python-client
0 stars 1 forks source link

Receiving "no module named json" error upon testing #558

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download gdata-2.0.15
2. install via "setup.py"
3. enter "./tests/run_data_tests.py"

What is the expected output? What do you see instead?
Expected is listed on Getting Started page as:
Running all tests in module gdata_test
.......
----------------------------------------------------------------------
Ran 7 tests in 0.025s

OK

The output I am getting is:
Traceback (most recent call last):
  File "./tests/run_data_tests.py", line 9, in <module>
    import gdata_test
  File "/Users/mistakes/Desktop/pytube/gdata-2.0.15/tests/gdata_test.py", line 29, in <module>
    import gdata.test_config as conf
  File "/Library/Python/2.5/site-packages/gdata/test_config.py", line 23, in <module>
    import gdata.gauth
  File "/Library/Python/2.5/site-packages/gdata/gauth.py", line 64, in <module>
    import json as simplejson
ImportError: No module named json

What version of the product are you using?
I am using gdata-2.0.15.
I am running Python 2.7.2

Please provide any additional information below.
I installed Python 2.7.2 after getting the same error with an earlier version 
of Python.
I attempted to manually install simplejson, but this didn't change the error.
I feel a bit at sea as the documentation I was following 
(http://code.google.com/apis/gdata/articles/python_client_lib.html) only lists 
what to do if the test works (nothing) and provides no info on what to do if 
the test fails. :(

Original issue reported on code.google.com by patrick....@gmail.com on 3 Nov 2011 at 2:33

GoogleCodeExporter commented 9 years ago
After running the test a different way, I no longer received this error. I 
think I may simply be bad at file paths...

However, I have run into the "atom_tests.mock_http_test" Failure during the 
tests as listed in another Issue.

Original comment by patrick....@gmail.com on 3 Nov 2011 at 3:55

GoogleCodeExporter commented 9 years ago
Most users of the library won't actually even need this, but:

Python 2.7 comes bundled with the json package. Older versions require 
simplejson. This horrible situation is caused by changing the package name, 
then including it in the standard library. Best fix is to just install it for 
older python versions, or just use 2.7 if you can.

From our side we should explain this in the wiki page.

Original comment by afs...@google.com on 3 Nov 2011 at 6:57