Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
prof7bit opened this issue Jun 29, 2022 · 1 comment
Closed

Comments

@prof7bit
Copy link

prof7bit commented Jun 29, 2022

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
Copy link
Owner

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.

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

No branches or pull requests

2 participants