Skip to content

Default settings .ini file workaround - #1234

Merged
sergey-yaroslavtsev merged 2 commits into
masterfrom
default_settings
Jul 27, 2026
Merged

Default settings .ini file workaround#1234
sergey-yaroslavtsev merged 2 commits into
masterfrom
default_settings

Conversation

@sergey-yaroslavtsev

Copy link
Copy Markdown
Collaborator

Several times already when pymca.ini saved in some old version (last tie people was using 5.5.5) lead to silent hang on start for new versions - no errors, no warnings, nothing - just infinite try to start.
Several times I have problem when people accidentally save the .ini file and then have problems (like longer start, "strange" behavior, ...) .
Moreover, it was super easy to save it and then very complicated to remove it (because you need to know by heart where it is).
It ruins idea that PyMca is adapted to new standards (for example HDF5 become default option) but people could not have it because they have .ini file from old times (and they do not remember about it).

This PR simply add:

  1. message before saving default settings (to avoid accidents)
  2. ability to remove settings (to restore default settings for default settings) from the PyMca.
  3. command to remove pymca.ini (easier then --freshpurgerestart)

P.S.
From my perspective ideally would be to have this fille inside PyMca folder so user would need to explicitly save it and use it when installing new version but:
it is not possible on MacOS (any software do not have permission to write to Application),
finally it is simply a matter of choice.

@sergey-yaroslavtsev

Copy link
Copy Markdown
Collaborator Author

This PR partially related to #1204
If file is read with error - at least PyMca will start. If there is no error as i saw yesterday - it can be purged easily.

@sergey-yaroslavtsev
sergey-yaroslavtsev merged commit 35324f2 into master Jul 27, 2026
10 checks passed
@sergey-yaroslavtsev
sergey-yaroslavtsev deleted the default_settings branch July 27, 2026 09:47
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

Successfully merging this pull request may close these issues.

2 participants