#30378: AttributeError: 'NoneType' object has no attribute 'split'
------------------------------+--------------------------------------
Reporter: PM | Owner: nobody
Type: Bug | Status: closed
Component: Core (Other) | Version: master
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------------------------
Comment (by linehammer):
The AttributeError is an exception thrown when an object does not have the
attribute you tried to access. 'NoneType' object has no attribute 'split'
often indicates that the attribute you are trying to split is Null,
meaning there is no value in it to [http://net-
informations.com/python/file/split.htm split]. So, you need to check the
attribute is not Null before splitting. Something like..
if val is not None:
# ...
--
Ticket URL: <https://code.djangoproject.com/ticket/30378#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.38ac7f3ed3f878b7ace2fe202b7af52d%40djangoproject.com.