Skip to content
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

Python 3.13 incompatibility: del arg_values['frame'] #343

Open
jklymak opened this issue Mar 15, 2025 · 0 comments
Open

Python 3.13 incompatibility: del arg_values['frame'] #343

jklymak opened this issue Mar 15, 2025 · 0 comments

Comments

@jklymak
Copy link

jklymak commented Mar 15, 2025

With Python 3.13.2 and xmitgcm 0.5.2

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[3], line 3
      1 td = '../results/StraightSlopeExpStrat002Dye/input/'
      2 td = '../results/StraightSlopeUpsidedownStrat001/input/'
----> 3 with xm.open_mdsdataset(td, iters='all', endian='<', prefix='dissipation') as ds:
      4     display(ds)
      5     ds=ds.isel(j=0, j_g=0).isel(time=-4)

File ~/Dropbox/CanyonMix/.pixi/envs/default/lib/python3.13/site-packages/xmitgcm/mds_store.py:166, in open_mdsdataset(data_dir, grid_dir, iters, prefix, read_grid, delta_t, ref_date, calendar, levels, geometry, grid_vars_to_coords, swap_dims, endian, chunks, ignore_unknown_vars, default_dtype, nx, ny, nz, llc_method, extra_metadata, extra_variables)
    164 frame = inspect.currentframe()
    165 _, _, _, arg_values = inspect.getargvalues(frame)
--> 166 del arg_values['frame']
    167 function_name = inspect.getframeinfo(frame)[2]
    169 # auto-detect whether to swap dims

ValueError: cannot remove local variables from FrameLocalsProxy

Doesn't occur for Python 3.12. Looks like python removed del for whatever arg_values is.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant