Closed klwalker-sb closed 1 year ago
Do you have a minimal example you can share?
The issue is pretty straightforward -- if epsg is passed to prepare.prepare_items as a string (e.g. '8858'), the code breaks with the new integer check at line 166. I was passing epsg as a string due to demands of upstream code and possibly different versions of pyproj. I was just wondering why a string could not be allowed to be recast as an integer as before. No worries, though. I fixed things upstream, so you can close this if it is not helpful.
As specified in the docs, the epsg
parameter was always expected to be an int. The fact that a string happened to work before was undefined behavior and not something to rely on, so I don't think this is a bug. Casting to an int yourself would be the right approach, so glad that worked for you.
Prepare.py line 166:
assert
isinstance(out_epsg, int), f"out_epsg
not found. {out_epsg=}"` now returns an error:because my epsg (and thus out_epsg) is originally cast as a string. I cannot simply set it as an int initially because it is manipulated by a different code that I cannot change. The script ran fine for me with the same parameters prior to change #188 because it would cast it to an int. Why can't it continue to cast to int?