On 05/11/2013 22:28, Nick the Gr33k wrote:
Στις 6/11/2013 12:06 πμ, ο/η John Gordon έγραψε:
In <l5bnpc$71v$1...@dont-email.me> Nick the Gr33k <nikos.gr...@gmail.com>
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.

Indeed.

The code i provided only worked once before it failed and managed to
store this:


counterID,host,refs,city,userOS,browser,visits,hits,download
-------------------------------------------------------------
1, 176-92-96-218.adsl.cyta.gr, Europe/Athens, Windows, Chrome,
0000-00-00 00:00:00, 1, ''

'visit's column is full of zeroes. Perhaps this is considered  as Null
for Python?

But ref is also null, why the code didn't complain for 'ref' which is
retrieved just before 'visits'?

How, i eman what si the way to investigate this further?


Don't worry about it. Just leave it with the crack team that I've put together for you. We should have some answers some time tomorrow.

--
Python is the second best programming language in the world.
But the best has yet to be invented.  Christian Tismer

Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to