If you cannot apply that patch locally to the yt installation on that machine (e.g. it's a cluster administered by someone else), I'm afraid you'll have to install a development version of yt and pull that change.
On 5/5/20 11:15 AM, Sam Patrick via yt-users wrote:
I've run into a problem when trying to initialize a simulation object with a start time and finish time. My code is:
import yt from yt.units import Myr
simulation = yt.simulation("DD0005/output_0005", 'Enzo') simulation.get_time_series(initial_time= 284.098 * Myr, final_time= 284.292 * Myr, redshift_data=False)
Trying to run this script results in the following error:
Traceback (most recent call last): File "mini_test.py", line 5, in <module> simulation.get_time_series(initial_time= 284.098 * Myr, final_time= 284.292 * Myr, redshift_data=False) File "/opt/apps/pkgs/cpython/3.7.1/intel64/intel_2019.2/lib/python3.7/site-packages/yt/frontends/enzo/simulation_handling.py", line 292, in get_time_series my_initial_time.convert_to_units("s") UnboundLocalError: local variable 'my_initial_time' referenced before assignment
Any help on this issue would be much appreciated.
Many thanks, Sam Patrick _______________________________________________ yt-users mailing list -- firstname.lastname@example.org To unsubscribe send an email to email@example.com https://mail.python.org/mailman3/lists/yt-users.python.org/ Member address: firstname.lastname@example.org