Re: [rst2pdf] AttributeError: 'list' object has no attribute 'split'

934 views
Skip to first unread message

Patrick Maupin

unread,
May 19, 2013, 10:18:17 PM5/19/13
to rst2pdf-discuss
Looks like authors can be a list. Who knew?

Anyway, since you're trying to end up with a list, just wrap the offending line:

try:
authors=self.document.settings.author.split('\\')
except AttributeError:
pass


On Sun, May 19, 2013 at 5:41 AM, J Luis <jmf...@gmail.com> wrote:
> Hi,
>
> I keep getting this error when trying to convert a sphinx project. Windows7
> + python2.7 here
>
> Any ideas why?
> Thanks
>
> Joaquim
>
> resolving references...
> done
> writing gmt5... [ERROR] pdfbuilder.py:130 'list' object has no attribute
> 'split'
> Traceback (most recent call last):
> File
> "C:\programs\WinPython2.7.3_32\python-2.7.3\lib\site-packages\rst2pdf-0.93.dev-py2.7.egg\rst2pdf\pdfbuilder.py",
> line 127, in write
> docwriter.write(doctree, destination)
> File
> "C:\programs\WinPython2.7.3_32\python-2.7.3\lib\site-packages\docutils\writers\__init__.py",
> line 80, in write
> self.translate()
> File
> "C:\programs\WinPython2.7.3_32\python-2.7.3\lib\site-packages\rst2pdf-0.93.dev-py2.7.egg\rst2pdf\pdfbuilder.py",
> line 582, in translate
> authors=self.document.settings.author.split('\\')
> AttributeError: 'list' object has no attribute 'split'
>
> --
> You received this message because you are subscribed to the Google Groups
> "rst2pdf-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rst2pdf-discu...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

J Luis

unread,
May 20, 2013, 7:28:56 AM5/20/13
to rst2pdf...@googlegroups.com
Thanks, that allowed moving to next probelm

After a long list of errors it ends

  File "C:\programs\WinPython2.7.3_32\python-2.7.3\lib\site-packages\matplotlib\pyparsing_py2.py", line 989, in _parseNoCache
    tokens = fn( instring, tokensStart, retTokens )
  File "C:\programs\WinPython2.7.3_32\python-2.7.3\lib\site-packages\matplotlib\mathtext.py", line 2741, in subsuper
    super.shrink()
AttributeError: 'unicode' object has no attribute 'shrink'

I have investigated and it happens with math expressions of the type:

   :math:`u' = x`

where the offending "unicode" is in fact the vertical tick after the u. That is, this works

   :math:`u = x`

Now this is think is a bug

Joaquim

Johannes Eckstein

unread,
Aug 6, 2013, 6:09:43 AM8/6/13
to rst2pdf...@googlegroups.com
Having a similar problem here:
 
    super.shrink()
AttributeError: 'unicode' object has no attribute 'shrink'
Seems we have some conflict with matplotlib.mathtext here, is there a patch suggestion?
 
because this is really anoying!
Reply all
Reply to author
Forward
0 new messages