TypeError: Can't convert 'NoneType' object to str implicitly

0 Jagdeep Matharu · July 6, 2015
Hi all, i am little stuck with this error that i again encountering.

TypeError: Can't convert 'NoneType' object to str implicitly

at this point of time i cant share code but in short when i enter correct URL it works and when i type in FALSE url code thrw this exception.

now i also had other exceptions (ValueError,  TypeError, HTTPError) but i handled them.

i found some suggestions from Dr, Google but none worth.

Can any one help me. 

Thanks In advance :)

Post a Reply


Oldest  Newest  Rating
0 Otto Von Chesterfield · July 6, 2015
Can you tell us what the false URL is, and what class you're turning the URL into a str? That could help us a lot!

0 Jagdeep Matharu · July 6, 2015
false url is any fake one, in one case i had just deleted .png from end and in other case i entered 'asd'

and i am just using 'str()' for converting the entered value
0 Otto Von Chesterfield · July 7, 2015
I'm trying to figure it out in my code, but I am having a huge problem trying to get the same error you're getting, and it's this much impossible since I don't have any code snippets to work with.

Any information regarding your code can help me help you!
0 Jagdeep Matharu · July 7, 2015
Hmm, I understand, the code is similar to new boston image down loader, 


And you can try entering image url without. Png or just 'abc'
0 Otto Von Chesterfield · July 7, 2015
Here's a thought: Is there anything in your code that you might have accidentally set as None, or just nothing in it?

I don't know if you have more than one value in the line you're having trouble with, but try printing out every variable the line uses right before the command, and - right after it - the variable's type.

Tell me if that works!
  • 1



This section is all about snakes! Just kidding.

Bucky Roberts Administrator