Help me with this code PLEASE

Antoon Pardon antoon.pardon at rece.vub.ac.be
Wed Nov 6 09:27:31 CET 2013


Op 05-11-13 22:26, Nick the Gr33k schreef:

> I know i'm close to solution, i can feel it but i have some issues.
> The code we arr discussing is the following:

No you are not. You are just doing random changes, without any
understanding. If you had followed my suggestion and actually
read the documentation of fetchone, you would have realised
this wouldn't have worked either.

Your resistance to reading the documentation is making you lose
more time than you hoped to win by just going ahead and trying
things blindly.

> [Tue Nov 05 23:21:52 2013] [error] [client 176.92.96.218]   File
> "/home/nikos/public_html/cgi-bin/metrites.py", line 274, in <module>
> [Tue Nov 05 23:21:52 2013] [error] [client 176.92.96.218]     visit =
> visit.split()
> [Tue Nov 05 23:21:52 2013] [error] [client 176.92.96.218]
> AttributeError: 'NoneType' object has no attribute 'split'

This is essentially the same error you had before. You have an object
of NoneType where you expect something different. Changing your code
to use split instead of iteration won't change the fact that you have
an object of NoneType.

-- 
Antoon Pardon



More information about the Python-list mailing list