I get the error E501: line too long
from this code:
header, response = client.request('https://api.twitter.com/1.1/statuses /user_timeline.json?include_entities=true&screen_name='+username+'&count=1')
but if I write this way or another way:
header, response = client.request('\
https://api.twitter.com/1.1/statuses/user_timeline.\
json?include_entities=true&screen_name='+username+'&count=1')
I get this error:
ValueError: Unsupported URL https://api.twitter.com/1.1/statuses/user_timeline .json?include_entities=true&screen_name=username&count=1 ().
or I get this error:
ValueError: No JSON object could be decoded
So please tell me, how can I pass this error?
You could also go to into the code analysis and ignore that kind or error/warning. I am using eclipse and Pydev.
Restart Eclipse and it should be fine for this warning.
You could build the string on multiple lines:
The whitespaces at the beginning of the lines become part of your string if you break it like this.
Try this:
The strings will automatically be concatenated.