Hi,

AFAIK there's no 2vs3 glitch in dblatex since i only use python 2.7.  
ParseError was introduced in python 2.7. See here:

https://docs.python.org/2.7/whatsnew/2.7.html#updated-module-elementtree-1-3

So maybe you have the problem because you are using python 2.6? If you  
want to be sure type the following:

$ python
Python 2.7.3 (default, Sep 26 2013, 20:08:41)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import xml.etree.ElementTree as ET
>>> ET.ParseError
<class 'xml.etree.ElementTree.ParseError'>
>>> ET.__file__
'/usr/lib/python2.7/xml/etree/ElementTree.pyc'
>>>

Tell me what happens,

Regards,
BG

On Wed, 16 Nov 2016 22:41:25 +0100, maxwell <maxw...@umiacs.umd.edu> wrote:

> I've run into a problem using dblatex 0.3.9:
> --------
> Traceback (most recent call last):
>    File "/groups/tools/dblatex/dblatex-0.3.9/scripts/dblatex", line 8, in
> <module>
>      from dbtexmf.dblatex import dblatex
>    File
> "/home/groups/tools/dblatex/dblatex-0.3.9/lib/dbtexmf/dblatex/dblatex.py",
> line 8, in <module>
>      from dbtexmf.core.dbtex import DbTex, DbTexCommand
>    File
> "/home/groups/tools/dblatex/dblatex-0.3.9/lib/dbtexmf/core/dbtex.py",
> line 17, in <module>
>      from dbtexmf.core.confparser import DbtexConfig
>    File
> "/home/groups/tools/dblatex/dblatex-0.3.9/lib/dbtexmf/core/confparser.py",
> line 4, in <module>
>      from xml.etree.ElementTree import ParseError
> ImportError: cannot import name ParseError
> --------
> This seems to be happening because the xml.etree.ElementTree library
> does not contain ParseError; rather, ParseError was introduced in the
> Python 3 version of xml.etree.ElementTree.  (ParseError appears in
> https://docs.python.org/3/library/xml.etree.elementtree.html, but not in
> https://docs.python.org/2.7/library/xml.etree.elementtree.html.)
>
> ParseError was added to dblatex in version 0.3.8 (with commit 83e50d).
>
> So I'm assuming that dblatex now needs Python3, not Python2.  (Maybe
> there are other places where it relies on having Python3?)  But for
> various reasons, 'python' on our system defaults to Python2.  (I have
> 'python' aliased to Python3, but that doesn't affect dblatex.)
>
> Is there a way to tell dblatex 0.3.9 to use Python3 instead of Python2?
> I guess I could do something with 'export', but I'd rather have some
> other way to inform dblatex of which Python to use.
>
> Alternatively, can ParseError be defined directly in confparser.py
> (maybe using a try...except construct)?  That of course assumes that
> this is the only Python 2vs3 glitch.
>
>     Mike Maxwell
>     University of Maryland
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Dblatex-users mailing list
> Dblatex-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dblatex-users

------------------------------------------------------------------------------
_______________________________________________
Dblatex-users mailing list
Dblatex-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dblatex-users

Reply via email to