Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #58533
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'retrieved': 0.05; 'attribute': 0.07; 'column': 0.07; 'subject:code': 0.07; 'variables': 0.07; 'lawrence': 0.09; 'null,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'tismer': 0.09; 'windows,': 0.09; 'subject:Help': 0.11; 'python': 0.11; 'stored': 0.12; 'chrome,': 0.16; 'columns': 0.16; 'fetch': 0.16; 'how,': 0.16; 'investigate': 0.16; 'nick': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:PLEASE': 0.16; 'unpack': 0.16; 'language': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'appears': 0.22; 'programming': 0.22; 'python?': 0.22; 'header :User-Agent:1': 0.23; 'why.': 0.24; "i've": 0.25; 'this:': 0.26; 'second': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In- Reply-To:1': 0.27; 'host': 0.29; 'leave': 0.29; 'code': 0.31; 'further?': 0.31; 'table,': 0.31; 'writes:': 0.31; 'lists': 0.32; 'worked': 0.33; 'subject:with': 0.35; 'but': 0.35; 'next': 0.36; "didn't": 0.36; 'should': 0.36; 'step': 0.37; 'christian': 0.38; 'nov': 0.38; 'to:addr:python-list': 0.38; 'track': 0.38; 'to:addr:python.org': 0.39; 'skip:- 60': 0.39; 'received:org': 0.40; 'worry': 0.60; 'full': 0.61; 'world.': 0.61; 'john': 0.61; "you're": 0.61; 'you.': 0.62; 'act': 0.63; 'visit': 0.64; 'skip:1 20': 0.65; '8bit%:92': 0.71; 'subject:this': 0.83; 'ref': 0.84; 'visit,': 0.84; 'received:89': 0.85 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
| Subject | Re: Help me with this code PLEASE |
| Date | Tue, 05 Nov 2013 22:44:17 +0000 |
| References | <l5b8if$4k1$1@dont-email.me> <l5bjs6$84r$1@reader1.panix.com> <l5bnpc$71v$1@dont-email.me> <l5bq5o$906$1@reader1.panix.com> <l5brem$trk$1@dont-email.me> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| X-Gmane-NNTP-Posting-Host | host-89-240-162-119.as13285.net |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 |
| In-Reply-To | <l5brem$trk$1@dont-email.me> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2064.1383691475.18130.python-list@python.org> (permalink) |
| Lines | 57 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1383691475 news.xs4all.nl 15942 [2001:888:2000:d::a6]:38438 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:58533 |
Show key headers only | View raw
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.gr33k@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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Help me with this code PLEASE Nick the Gr33k <nikos.gr33k@gmail.com> - 2013-11-05 19:06 +0200
Re: Help me with this code PLEASE Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-11-05 18:23 +0100
Re: Help me with this code PLEASE mm0fmf <none@mailinator.com> - 2013-11-05 17:33 +0000
Re: Help me with this code PLEASE Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-05 17:41 +0000
Re: Help me with this code PLEASE Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-11-05 18:53 +0100
Re: Help me with this code PLEASE Nick the Gr33k <nikos.gr33k@gmail.com> - 2013-11-05 19:59 +0200
Re: Help me with this code PLEASE Tobiah <toby@tobiah.org> - 2013-11-05 10:11 -0800
Re: Help me with this code PLEASE Joel Goldstick <joel.goldstick@gmail.com> - 2013-11-05 14:01 -0500
Re: Help me with this code PLEASE Denis McMahon <denismfmcmahon@gmail.com> - 2013-11-05 18:02 +0000
Re: Help me with this code PLEASE Nick the Gr33k <nikos.gr33k@gmail.com> - 2013-11-05 20:09 +0200
Re: Help me with this code PLEASE Denis McMahon <denismfmcmahon@gmail.com> - 2013-11-05 20:10 +0000
Re: Help me with this code PLEASE Cameron Simpson <cs@zip.com.au> - 2013-11-06 09:31 +1100
Re: Help me with this code PLEASE bob gailer <bgailer@gmail.com> - 2013-11-05 18:15 -0500
Re: Help me with this code PLEASE Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-05 23:36 +0000
Re: Help me with this code PLEASE John Gordon <gordon@panix.com> - 2013-11-05 20:19 +0000
Re: Help me with this code PLEASE Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-05 21:17 +0000
Re: Help me with this code PLEASE Nick the Gr33k <nikos.gr33k@gmail.com> - 2013-11-05 23:26 +0200
Re: Help me with this code PLEASE John Gordon <gordon@panix.com> - 2013-11-05 22:06 +0000
Re: Help me with this code PLEASE Nick the Gr33k <nikos.gr33k@gmail.com> - 2013-11-06 00:28 +0200
Re: Help me with this code PLEASE Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-05 22:44 +0000
Re: Help me with this code PLEASE John Gordon <gordon@panix.com> - 2013-11-05 22:54 +0000
Re: Help me with this code PLEASE Nick the Gr33k <nikos.gr33k@gmail.com> - 2013-11-06 03:14 +0200
Re: Help me with this code PLEASE Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-06 08:49 +0000
Re: Help me with this code PLEASE Joel Goldstick <joel.goldstick@gmail.com> - 2013-11-06 08:57 -0500
Re: Help me with this code PLEASE Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-11-06 09:27 +0100
Re: Help me with this code PLEASE Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-05 21:42 +0000
Re: Help me with this code PLEASE Chris Angelico <rosuav@gmail.com> - 2013-11-06 09:03 +1100
Re: Help me with this code PLEASE Piet van Oostrum <piet@vanoostrum.org> - 2013-11-05 18:15 -0400
Re: Help me with this code PLEASE Nick the Gr33k <nikos.gr33k@gmail.com> - 2013-11-06 00:35 +0200
Re: Help me with this code PLEASE Denis McMahon <denismfmcmahon@gmail.com> - 2013-11-06 00:45 +0000
Re: Help me with this code PLEASE Ben Finney <ben+python@benfinney.id.au> - 2013-11-06 12:46 +1100
Re: Help me with this code PLEASE Grant Edwards <invalid@invalid.invalid> - 2013-11-06 14:50 +0000
Re: Help me with this code PLEASE Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-11-05 19:32 -0500
csiph-web