errors in metapython tutorial following easy_install; python 2.6.2

4 views
Skip to first unread message

Nick Caruso

unread,
Oct 15, 2010, 2:14:47 PM10/15/10
to metapython
I include the following code to reproduce the problem:
(first, put the code for "simple metapython file" from the tutorial
into a file named smp.mpy, run

ncaruso@budds-creek:~/Desktop/Dropbox/src/py/MP$ python2.6
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import metapython
>>> metapython.install_import_hook()
>>> import smp
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.linux-x86_64/egg/metapython/core.py", line 40, in
load_module
File "build/bdist.linux-x86_64/egg/metapython/core.py", line 53, in
import_file
File "build/bdist.linux-x86_64/egg/metapython/core.py", line 71, in
expand_file
File "build/bdist.linux-x86_64/egg/metapython/core.py", line 94, in
expand
File "build/bdist.linux-x86_64/egg/metapython/parse.py", line 459,
in expand_defcode_blocks
File "build/bdist.linux-x86_64/egg/metapython/parse.py", line 362,
in expand_defcode_blocks
File "build/bdist.linux-x86_64/egg/metapython/parse.py", line 459,
in expand_defcode_blocks
File "build/bdist.linux-x86_64/egg/metapython/parse.py", line 346,
in expand_defcode_blocks
File "build/bdist.linux-x86_64/egg/metapython/parse.py", line 345,
in <genexpr>
File "build/bdist.linux-x86_64/egg/metapython/parse.py", line 344,
in <genexpr>
File "build/bdist.linux-x86_64/egg/metapython/parse.py", line 445,
in __str__
File "build/bdist.linux-x86_64/egg/metapython/parse.py", line 451,
in as_python
File "build/bdist.linux-x86_64/egg/metapython/parse.py", line 119,
in string_from_tokens
File "/usr/lib/python2.6/tokenize.py", line 262, in untokenize
return ut.untokenize(iterable)
File "/usr/lib/python2.6/tokenize.py", line 198, in untokenize
self.add_whitespace(start)
File "/usr/lib/python2.6/tokenize.py", line 187, in add_whitespace
assert row <= self.prev_row
AssertionError
>>>

Nick Caruso

unread,
Oct 18, 2010, 5:31:42 PM10/18/10
to metapython
I'm looking into the problem I mentioned above. It seems like I can
make it happen without metapython so it might be some problem with my
installation of python 2.6.2.

Actually, it's a bug in python: Issue9974

http://bugs.python.org/issue9974?@ok_message=msg%20119084%20created%3Cbr%3Eissue%209974%20message_count,%20messages%20edited%20ok&@template=item

Reply all
Reply to author
Forward
0 new messages