-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
index error when code error #1
Comments
I just pushed an updated version that will fix the IndexError. This was caused by the error message parser trying to read beyond the beginning of the error file. Since pythontex.py was trying to parse an error message (unsuccessfully), your code is apparently producing some type of error that it cannot connect with a specific line number. I would be very interested in an example, if you can post one, so I can refine error handling. |
Good, the error is caused by calling an external function (so no latex line number) with the wrong argument. I can post a minimal example if you wish. |
I would be interested in a minimal example. |
On May 10, 2012, at 2:52 , gpoore wrote:
\documentclass{article} produces: Errors for pylab_default_default
The above code is fixed by using Another issue: it would be prefferable if user code is run in the root directory so that the original example would work. Regards,Øystein Bjørndal |
Thanks for the example. It turns out that the previous fix didn't actually resolve the issue. I fixed the actual cause: e064b10 |
Code currently runs in the pythontex-files-{jobname} directory so as to isolate all PythonTeX-generated content. But I can see why it might be useful to be able to run in a user-specified directory. I will look into adding that as a feature in the next commit. By the way, any graphics created in pythontex-files-{jobname} are available without specifying the directory if you are using the package graphicx. For example, if you create sin.pdf in pythontex-files-myTest, you can access it via \includegraphics{sin.pdf}, without specifying the directory. This behavior is set automatically via \graphicspath. But it hasn't yet made it into the non-technical part of the documentation. |
Regarding the directory in which code runs: Beta 3 addresses this, with the \setpythontexworkingdir macro. |
I get the following error when I type something wrong in the pylabcode environment:
while not codefile[errlinenumber].startswith('pytex.inputline=') and errlinenumber>-1:
IndexError: list index out of range
The text was updated successfully, but these errors were encountered: