You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
line 227 of AfricasTalkingGateway.py - changed print(response) instead of print response.
import urllib2 is depracted in python3. The urllib2 and urllib in python2.x were combined and split across various modules in python3. Instead of: import urllib2
import urllib
`
For python3: from urllib.request import Request, urlopen from urllib.parse import urlencode
You can try wrapping it in a try-except block to check for both. e.g try: from urllib.request import urlopen except: from urllib2 import urlopen
After doing this, it works. Danke!
The text was updated successfully, but these errors were encountered:
AfricastalkingGateway.py Fixes
line 227 of AfricasTalkingGateway.py - changed print(response) instead of print response.
import urllib2 is depracted in python3. The urllib2 and urllib in python2.x were combined and split across various modules in python3. Instead of:
import
urllib2import urllib
`
For python3:
from urllib.request import Request, urlopen from urllib.parse import urlencode
You can try wrapping it in a try-except block to check for both. e.g
try: from urllib.request import urlopen except: from urllib2 import urlopen
After doing this, it works. Danke!
The text was updated successfully, but these errors were encountered: