Skip to content

Address Python version issues - #35

Open
leticialopesms wants to merge 6 commits into
MICLab-Unicamp:mainfrom
leticialopesms:fix
Open

leticialopesms wants to merge 6 commits into
MICLab-Unicamp:mainfrom
leticialopesms:fix

Conversation

@leticialopesms

@leticialopesms leticialopesms commented Sep 6, 2026

Copy link
Copy Markdown

Hi! This PR includes some fixes related to Python version compatibility. Python 3.8 and 3.9 versions presented installation issues with python-gdcm, a dependency of dicom2nifti.

Here are the main changes:

  • Update the minimum Python version to 3.10.
  • Log and display traceback details for unexpected Tkinter errors.
  • Fix compatibility issues related to older Python versions (float to string conversions, dictionary copying, and other cases).

These changes were tested in the updated environment and worked fine with Python versions up to 3.13.

@dscarmo, could you please take a look when you have a chance?

Fixes #33

@dscarmo

dscarmo commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Thank you Leticia! It worked for me with Python 3.10

I still have an error when trying to run on Python 3.14, it might be easy to fix? Since it's common to use newer versions today, I thought we might also try to fix this when you have time:

Traceback (most recent call last):
  File "/home/diedre/miniconda3/envs/micview/bin/micview", line 6, in <module>
    sys.exit(main())
             ~~~~^^
  File "/home/diedre/miniconda3/envs/micview/lib/python3.14/site-packages/micview/run.py", line 67, in main
    window = MainWindow()
  File "/home/diedre/miniconda3/envs/micview/lib/python3.14/site-packages/micview/views/windows/MainWindow.py", line 30, in __init__
    self.create()
    ~~~~~~~~~~~^^
  File "/home/diedre/miniconda3/envs/micview/lib/python3.14/site-packages/micview/views/windows/MainWindow.py", line 41, in create
    self.configWindow()
    ~~~~~~~~~~~~~~~~~^^
  File "/home/diedre/miniconda3/envs/micview/lib/python3.14/site-packages/micview/views/windows/MainWindow.py", line 58, in configWindow
    initModels(master=self)
    ~~~~~~~~~~^^^^^^^^^^^^^
  File "/home/diedre/miniconda3/envs/micview/lib/python3.14/site-packages/micview/models/getters.py", line 37, in initModels
    states['loading_states'] = LoadingStatesClass(master=master)
                               ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/home/diedre/miniconda3/envs/micview/lib/python3.14/site-packages/micview/models/states/loading_states.py", line 21, in __init__
    self.__loading.trace(mode='w', callback=loadingHook)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/diedre/miniconda3/envs/micview/lib/python3.14/tkinter/__init__.py", line 512, in trace_variable
    self._tk.call("trace", "variable", self._name, mode, cbname)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: bad option "variable": must be add, info, or remove

Again, não é urgente, só se tiver tempo. Obrigado!

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.

pip install . fails

2 participants