In <[email protected]> Nick the Gr33k <[email protected]>
writes:
> # fetch those columns that act as lists but are stored as
> strings
> cur.execute('''SELECT refs, visits, downloads FROM visitors
> WHERE
> counterID = %s and host = %s''', (cID, host) )
> data = cur.fetchone()
> if cur.rowcount:
> # unpack data into variables
> (ref, visit, download) = data
>
> visit = visit.split()
>
> [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'
It appears that in the row you're fetching from the visitors table, the
'visits' column is NULL.
Your next step is track down why.
--
John Gordon Imagine what it must be like for a real medical doctor to
[email protected] watch 'House', or a real serial killer to watch 'Dexter'.
--
https://mail.python.org/mailman/listinfo/python-list