You are passing through None to reportlab, not a string. Follow the  
traceback and you will find the line in your code where the error  
occurs.

--
   Andy McKay
   www.clearwind.ca

On 2009-11-26, at 5:40 AM, adelaide_mike <mike.ro...@internode.on.net>  
wrote:

> In my report generating view I have this (snip):
>
> if tablename == 'Area':
>        areas = Area.objects.all()
>        data.append(['Code','Name','Description'])
>        for area in areas:
>            data.append([
>            Paragraph(area.area, normalstyle, bulletText=None),
>            Paragraph(area.nick, normalstyle, bulletText=None),
>            Paragraph(area.desc, normalstyle, bulletText=None)
>            ])
>        table = Table(data, 1*[0.75*inch]+1*[2.0*inch]+1*[4.0*inch],
> style=ts)
>
> elif tablename == 'Rack':
>        racks = Rack.objects.all()
>        data.append(['Code','Name', 'Description'])
>        for rack in racks:
>            data.append([
>            Paragraph(rack.rack, normalstyle, bulletText=None),
>            Paragraph(rack.nick, normalstyle, bulletText=None),  #
> thats line 108
>            Paragraph(rack.desc, normalstyle, bulletText=None)
>            ])
>        table = Table(data, 1*[1.25*inch]+1*[2.0*inch]+1*[4.0*inch],
> style=ts)
>
> When tablename = "Area" the .pdf is generated without error.  Wnen it
> is "Rack" this error is raised:
>
> Traceback (most recent call last):
>
> File "/home/mrowan/django/django/core/handlers/base.py", line 86, in
> get_response
>   response = callback(request, *callback_args, **callback_kwargs)
>
> File "/home/mrowan/projects/cbm/djcbm/cbm/reports.py", line 108, in
> print_list
>   Paragraph(rack.nick, normalstyle, bulletText=None),
>
> File "/usr/lib/python2.5/site-packages/reportlab/platypus/
> paragraph.py", line 523, in __init__
>   self._setup(text, style, bulletText, frags, cleanBlockQuotedText)
>
> File "/usr/lib/python2.5/site-packages/reportlab/platypus/
> paragraph.py", line 543, in _setup
>   text = cleaner(text)
>
> File "/usr/lib/python2.5/site-packages/reportlab/platypus/
> paragraph.py", line 61, in cleanBlockQuotedText
>   L=filter(truth,map(_lineClean, split(text, '\n')))
>
> File "/usr/lib/python2.5/site-packages/reportlab/platypus/
> paragraph.py", line 23, in split
>   return [uword.encode('utf8') for uword in text.split(delim)]
>
> AttributeError: 'NoneType' object has no attribute 'split'
>
> What does the error message mean?  Can someone translate please? TIA
>
> Mike
>
> --
>
> You received this message because you are subscribed to the Google  
> Groups "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com 
> .
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en 
> .
>
>

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


Reply via email to