Please I have been trying to import the api from pypodio and I keep on getting this error: ImportError: cannot import name 'urlencode' from 'urllib'.I have tried all the suggestions I saw on stack overflow but the error still persists. Using python3. The line of code I am using is:from pypodio2 import api
Asked
Active
Viewed 466 times
0
-
Please provide enough code so others can better understand or reproduce the problem. – Community Feb 25 '22 at 12:42
2 Answers
0
I looked at this. There python wrapper has not been set up for python 3 (or at least 3.9), the libraries they are referencing are different - instead they need to import urlencode from urllib.parse. There are a few other areas like that.
Here is an example:
class PodioClient():
client_id = settings.PODIO_SETTINGS.get('client_id')
client_secret = settings.PODIO_SETTINGS.get('client_secret')
apps = settings.PODIO_SETTINGS.get('apps')
def get_client(self, app_name: str):
for app in self.apps:
if app.get('name') == app_name:
return api.OAuthAppClient(
client_id=self.client_id,
client_secret=self.client_secret,
app_id=app.get('id'),
app_token=app.get('token')
)
raise Exception('No app has been implemented for {}'.format(app_name))
def handle(self, item_id):
response = PodioClient().get_client('valuations').Item.find(item_id)
# call handle with the item id
We really just need the python wrapper to get an update. Any chance you can all get on that?

Jordan Braginton
- 1
- 1
-
Actually, there is a draft PR in for this already. We just need to get it merged soon hopefully? – Jordan Braginton Mar 22 '22 at 00:30
0
Download podio library from github and pip install the zip file, then it will show no errors while installing. Also do not directly install from github or pip install Podio2.