openx / OX3-Python-API-Client

Helper class for accessing the OX3 API - Requires https://github.com/simplegeo/python-oauth2
Other
8 stars 17 forks source link

ConfigParser in python3 #35

Closed oluaPt closed 7 years ago

oluaPt commented 7 years ago

Hey, i have this error:

import ox3apiclient # https://docs.openx.com/Content/developers/platform_api/about_topics_api.html File "/usr/local/lib/python3.5/dist-packages/ox3apiclient/init.py", line 3, in import ConfigParser ImportError: No module named 'ConfigParser'

emilyzzz commented 7 years ago

Hi @oluaPt, maybe it's PYTHONPATH issue, please make sure the path "ConfigParser" is installed is in PYTHONPATH.

I just had similar issue, for me it's "No module named requests_oauthlib". I fixed it by: 1) in python terminal, import sys, sys.path, to find what's in the path 2) open ~/.bash_profile, added line "export PYTHONPATH="${PYTHONPATH}:/usr/local/lib/python2.7/site-packages", then "source ~/.bash_profile". 3) go back to python terminal, try import ox3apiclient again. For me it worked after PYTHONPATH fixed.

flaker commented 7 years ago

@oluaPt

You seem to be using Python 3.X. That version of Python does not have the module ConfigParser. The develop branch already supports Python 3 by using Six. I hope it will be the master branch soon.

oluaPt commented 7 years ago

Hey, ty for the reply.

The issue here is that im using py3 and the module ConfigParser in py3 its configparser (without camel case), and thats the issue

flaker commented 7 years ago

@oluaPt yep. As soon as develop hits master and pypi it will be Python 2 and 3 compatible. If you use master today there are a couple of places you'll need to make fixes.

oluaPt commented 7 years ago

ok, any ideia when it will be on master? ty for the reply

flaker commented 7 years ago

hopefully soon... but it's not up to me. So I am just guessing :)

oluaPt commented 7 years ago

Ok, im going to close the issue, ty for the help =)

flaker commented 7 years ago

@oluaPt current Pypi version is Python 3 compatible (also develop and master were updated)