shredEngineer / MagnetiCalc

MagnetiCalc calculates the magnetic field of arbitrary coils.
https://paulwilhelm.de/magneticalc/
Other
45 stars 4 forks source link

TypeError: setValue(self, int): argument 1 has unexpected type 'float' #10

Closed prof7bit closed 2 years ago

prof7bit commented 2 years ago
bernd@bernd-privat:~/MagnetiCalc$ git describe --tags
v1.15.1-1-g19b6897
bernd@bernd-privat:~/MagnetiCalc$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04 LTS
Release:        22.04
Codename:       jammy

This is what happens when I try to start it:

bernd@bernd-privat:~/MagnetiCalc$ python3 -m magneticalc

MagnetiCalc v1.15.1
Copyright © 2020–2022, Paul Wilhelm, M. Sc. <mailto:anfrage@paulwilhelm.de>
ISC License (see README.md)

Performance Options: JIT Enabled, CUDA Not Available

main/__init__/Project.open_default()
main/__init__/open_default/Project.load(): Loading defaults
main/__init__/open_default/Project.load(): Creating empty User section
main/__init__/open_default/GUI.validate()
main/__init__/open_default/GUI.validate(): WARNING: Selected backend not available, using default backend
main/__init__/__init__/__init__/Model.set_parameters()
main/__init__/__init__/__init__/set_parameters/__exit__/Statusbar.invalidate()
main/__init__/__init__/__init__/set_parameters/__exit__/invalidate/Statusbar: Pending Calculation
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/bernd/MagnetiCalc/magneticalc/__main__.py", line 57, in <module>
    main()
  File "/home/bernd/MagnetiCalc/magneticalc/__main__.py", line 47, in main
    gui = GUI()
  File "/home/bernd/MagnetiCalc/magneticalc/GUI.py", line 109, in __init__
    self.reload()
  File "/home/bernd/MagnetiCalc/magneticalc/GUI.py", line 117, in reload
    self.sidebar_left.wire_widget.reload()
  File "/home/bernd/MagnetiCalc/magneticalc/Wire_Widget.py", line 299, in reload
    self.rotational_symmetry_count_spinbox.setValue(self.gui.project.get_float("rotational_symmetry_count"))
TypeError: setValue(self, int): argument 1 has unexpected type 'float'
GUI.cleanup()

Goodbye!
shredEngineer commented 2 years ago

Thank you, Bernd!

This is now fixed in the repository. The PyPI package will be updated tomorrow.

These type errors show up in Python 3.10, but they did not show up in Python 3.9. I have now confirmed that everything works in Python 3.10 also.

Have a great day! :) Let me know if there are any other issues or suggestions.