[rsf-devel] Issue with rendering pdfs using madagascar

1 view
Skip to first unread message

Luke Decker

unread,
Dec 13, 2018, 12:33:40 PM12/13/18
to rsf-...@lists.sourceforge.net
Antananarivoians,

Let me join Julien in identifying a peculiar emergent issue in Madagascar!  
Attempting to render pdfs using SConstruct (even $RSFSRC/book/geo384h/hw1 , which I used to make sure it wasn’t just my manuscript) produces the following error on my Linux workstation:

[luke@osiris hw1]$ scons pdf
scons: Reading SConscript files ...
SyntaxError: unqualified exec is not allowed in function 'colorize' it contains a nested function with free variables (tex.py, line 636)

I identified a workaround for those needing to generate manuscripts ASAP: switching to the dtw branch I created a couple months ago and reinstalling Madagascar mitigates this error.

This makes me think the error was sourced by some modifications made between then and now.

FYI here is a relevant error that gets thrown during installation of the main branch most current version of Madagascar:

__pycompile(["build/framework/rsf/tex.pyc"], ["build/framework/rsf/tex.py"])
SyntaxError: unqualified exec is not allowed in function 'colorize' it contains a nested function with free variables (tex.py, line 636)

Install file: "build/framework/rsf/tex.pyc" as "/workspace/luke/madagascar/lib/python2.7/site-packages/rsf/tex.pyc"
scons: *** [/workspace/luke/madagascar/lib/python2.7/site-packages/rsf/tex.pyc] build/framework/rsf/tex.pyc: No such file or directory
Install file: "config.py" as "/workspace/luke/madagascar/share/madagascar/etc/config.py"
scons: done building targets (errors occurred during build).


Thanks,

Luke

Zhicheng Geng

unread,
Dec 13, 2018, 2:44:15 PM12/13/18
to Luke Decker, rsf-...@lists.sourceforge.net
The problem is caused by this line in tex.py:
exec(progs, locals())
And it used to be
exec progs in locals()

This actually is a bug from python. Check the following link.
And this problem is fixed in Python 2.7.9.
Maybe you can upgrade your python or if it’s difficult to do that I can help you fix it in Madagascar’s source code.

Zhicheng

_______________________________________________
RSF-devel mailing list
RSF-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsf-devel

Reply all
Reply to author
Forward
0 new messages