Re: [Django] #3104: 'float' object has no attribute 'split' (was: AttributeError: 'NoneType' object has no attribute 'split')

342 views
Skip to first unread message

Django

unread,
Jun 5, 2011, 3:10:39 AM6/5/11
to django-...@googlegroups.com
#3104: 'float' object has no attribute 'split'
-------------------------------------+------------------------------
Reporter: anonymous | Owner: nobody
Type: defect | Status: closed
Milestone: | Component: Core (Other)
Version: | Severity: normal
Resolution: invalid | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
-------------------------------------+------------------------------
Changes (by anonymous):

* easy: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/3104#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 16, 2011, 2:59:59 PM6/16/11
to django-...@googlegroups.com
#3104: 'float' object has no attribute 'split'
-------------------------------------+------------------------------
Reporter: anonymous | Owner: nobody
Type: defect | Status: reopened
Milestone: | Component: Core (Other)
Version: | Severity: normal
Resolution: | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+------------------------------
Changes (by anonymous):

* status: closed => reopened
* ui_ux: => 0
* resolution: invalid =>


Comment:

Having AttributeError 'NoneType' object has no attribute 'strip' problem
Environment:


Request Method: GET
Request URL: http://172.16.13.46:8080/addRecord/

Django Version: 1.3
Python Version: 2.6.6
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'django.contrib.admindocs',
'CI']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.csrf.CsrfResponseMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')


Traceback:
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py"
in get_response
111. response = callback(request,
*callback_args, **callback_kwargs)
File "/home/dbarker/cisite/CI/views.py" in addRecord
73. u_data = collectdata(u) #collect the url information
File "/home/dbarker/cisite/CI/datagrab.py" in collectdata
48. data = urllib.urlopen(someurl)
File "/usr/lib/python2.6/urllib.py" in urlopen
86. return opener.open(url)
File "/usr/lib/python2.6/urllib.py" in open
179. fullurl = unwrap(toBytes(fullurl))
File "/usr/lib/python2.6/urllib.py" in unwrap
1034. url = url.strip()

Exception Type: AttributeError at /addRecord/
Exception Value: 'NoneType' object has no attribute 'strip'

--
Ticket URL: <https://code.djangoproject.com/ticket/3104#comment:4>

Django

unread,
Jun 16, 2011, 3:49:09 PM6/16/11
to django-...@googlegroups.com
#3104: 'float' object has no attribute 'split'
-------------------------------------+------------------------------
Reporter: anonymous | Owner: nobody
Type: defect | Status: closed
Milestone: | Component: Core (Other)
Version: | Severity: normal
Resolution: invalid | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+------------------------------
Changes (by aaugustin):

* status: reopened => closed
* resolution: => invalid


Comment:

Your problem occurs inside `urllib.urlopen(someurl)` in your own code, so
it's completely unrelated to Django, let alone to the ticket you reopened.

This tracker is not the right place to discuss Python usage problems.
Please ask such questions in a Python developers forum / chat instead.

PS: my guess is that `someurl` is `None`.

--
Ticket URL: <https://code.djangoproject.com/ticket/3104#comment:5>

Reply all
Reply to author
Forward
0 new messages