PrincetonUniversity / athena-public-version

(MOVED) Athena++ GRMHD code and adaptive mesh refinement (AMR) framework. Active repository --->
https://github.com/PrincetonUniversity/athena
BSD 3-Clause "New" or "Revised" License
160 stars 118 forks source link

Plot_lines.py error #58

Closed raginryan99 closed 4 years ago

raginryan99 commented 4 years ago

I am currently running ubuntu 18.04 and python 3.6.9. I'm trying to get the plot_lines.py code to run that comes with athena++. When running the example code found in the athena wiki however, errors occur. The code that is being put directly into the terminal is: ./configure.py \ --prob shock_tube make clean make -j bin/athena \ -i inputs/hydro/athinput.sod \ -d example

vis/python/plotlines.py \ example/Sod.block0.out1.00000.tab,,example/Sod.block0.out1.00025.tab, \ x1v \ rho,press,rho,press \ example/lines.png \ --styles=--,--,-,- \ --colors b,r,b,r \ --labels '$\rho\mathrm{initial}$,$p\mathrm{initial}$,$\rho\mathrm{final}$,$p_\mathrm{final}$' \ --x_min=-0.5 \ --x_max=0.5 \ --x_label '$x$'

After the last block of code is ran i get the following errors: vis/python/plot_lines.py: line 1: fg: no job control vis/python/plot_lines.py: line 23: /DirectClassPacket: No such file or directory vis/python/plot_lines.py: line 42: syntax error near unexpected token ifelse' vis/python/plot_lines.py: line 42: } ifelse'

Thank you for any help on this error.

c-white commented 4 years ago

I just tested the script with python3 version 3.6.3 and 3.7.0, and there were no errors. Those messages don't look like python, but rather they are coming from your shell.

One thing to try is calling the python interpreter directly: python3 vis/python/plot_lines.py ... Alternatively, check that you can run any scripts at all: echo 'print("test")' > temp.py && python3 temp.py should print test to the terminal.