You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When writing a FluxPoints table (.ecsv) to file it is not possible to overwrite it.
Expected behavior
The overwrite argument should be taken into account.
To Reproduce
From any analysis get a FluxPoints instance (in my case it was from obtained from LightCurveEstimator.run())
and call the write() method with overwrite=True.
You will get the following error,
OSError: File xxxxxx.ecsv already exists. If you mean to replace it then use the argument "overwrite=True".
Gammapy version
1.2
Bug description
When writing a
FluxPoints
table (.ecsv) to file it is not possible to overwrite it.Expected behavior
The
overwrite
argument should be taken into account.To Reproduce
From any analysis get a
FluxPoints
instance (in my case it was from obtained fromLightCurveEstimator.run()
)and call the
write()
method withoverwrite=True
.You will get the following error,
OSError: File xxxxxx.ecsv already exists. If you mean to replace it then use the argument "overwrite=True".
Other information
The bug is here:
gammapy/gammapy/estimators/points/core.py
Line 270 in 2475a00
It should be sufficient to pass the
overwrite
argument totable.write()
, because the default (inherited fromastropy.table.Table.write()
) isFalse
.The text was updated successfully, but these errors were encountered: