Closed GoogleCodeExporter closed 9 years ago
The with statement is available since ython 2.6 - according to your traceback,
you are using Python 2.5. In simple words: Markowik requires Python > 2.6.
A quick fix to make markowik work with Python 2.5 is to add this line before
any other imports in main.py:
from __future__ import division
Original comment by obensonne@googlemail.com
on 22 Jan 2012 at 12:14
I switched to python 2.7 and now there's other error:
dy@kontas:/usr/local/python/
bin$ ./markowik /home/dy/mrd
Traceback (most recent call last):
File "./markowik", line 8, in <module>
load_entry_point('markowik==0.1.1', 'console_scripts', 'markowik')()
File "build/bdist.linux-i686/egg/pkg_resources.py", line 318, in
load_entry_point
File "build/bdist.linux-i686/egg/pkg_resources.py", line 2221, in
load_entry_point
File "build/bdist.linux-i686/egg/pkg_resources.py", line 1954, in load
File
"/usr/local/python/lib/python2.7/site-packages/markowik/__init__.py", line
10, in <module>
from markowik.main import convert, BadURL
File "/usr/local/python/lib/python2.7/site-packages/markowik/main.py",
line 10, in <module>
from markowik import util
File "/usr/local/python/lib/python2.7/site-packages/markowik/util.py",
line 7, in <module>
from markdown import etree, STX, ETX
ImportError: cannot import name etree
Help me, please, because your app is ideal way to maintain / synchronize
wikipages on google code, github and sourceforge,
thnx
Original comment by damir.zelenika
on 22 Jan 2012 at 12:47
How did you install markowik? Via PyPI (i.e. with pip or easy_install), by
manually running setup.py, or are you using a buildout? It seems the markdown
module used by markowik isn't the one expected. What output do you get from:
$ python -c 'import markdown; print markdown.version'
Original comment by obensonne@googlemail.com
on 22 Jan 2012 at 3:56
Concerning the command in the previous post, of course use the same python used
to run markowik.
Original comment by obensonne@googlemail.com
on 22 Jan 2012 at 3:57
I checked it myself and the problem is that the API of the markdown module has
changed (in particular, the etree is missing). I'll fix this and publich a new
version.
Original comment by obensonne@googlemail.com
on 22 Jan 2012 at 4:10
Original comment by obensonne@googlemail.com
on 22 Jan 2012 at 4:10
I've installed markowik using pip
Original comment by damir.zelenika
on 22 Jan 2012 at 4:50
Python markdown 2.1 has a reasonable bunch of changes (compared to 2.0.3) -- it
will take me a while to adjust markowik to work with the new Markdown version.
In the mean time, you can fix your situation by installing markowik in version
2.0.3:
$ pip install markdown==2.0.3
Original comment by obensonne@googlemail.com
on 22 Jan 2012 at 8:16
I've jut published a new version of markowik (0.1.2) which explicitly requires
Python Markdown 2.0.3. If you run,
$ pip install markowik --upgrade
you should be done. The only (unlikely) problem of this solution is, that other
Python packages might require Python Markdown 2.1 -- a conflict! Here the
solution is to run markowik isolated, using buildout (see the section
'Contributions' in the README:
http://pypi.python.org/pypi/markowik#contributions) or virtualenv.
Original comment by obensonne@googlemail.com
on 22 Jan 2012 at 8:45
I've just set markdown to 2.0.3 and everything seems OK.
Thanks a lot for very agile intervention.
Original comment by damir.zelenika
on 22 Jan 2012 at 10:30
Release 0.2 fixes this issue.
Original comment by obensonne@googlemail.com
on 23 Jan 2012 at 10:46
Original issue reported on code.google.com by
damir.zelenika
on 21 Jan 2012 at 11:46