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

In some cases it gives a float #554

Open
osiixy opened this issue Dec 31, 2021 · 0 comments
Open

In some cases it gives a float #554

osiixy opened this issue Dec 31, 2021 · 0 comments

Comments

@osiixy
Copy link

osiixy commented Dec 31, 2021

self.ui.slider_persistence.setMaximum(config.persistence_max_size / 1024 / 1024)

To replicate the crash you need to select the destination partion and the ISO (in my case: tails-amd64-4.25.iso).
My solution is to force conversion to int.

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/scripts/mbusb_gui.py", line 286, in browse_iso
    self.ui_update_persistence()
  File "/usr/lib/python3.10/site-packages/scripts/mbusb_gui.py", line 303, in ui_update_persistence
    self.ui.slider_persistence.setMaximum(config.persistence_max_size / 1024 / 1024)
TypeError: setMaximum(self, int): argument 1 has unexpected type 'float'
Aborted (core dumped)

solution:

self.ui.slider_persistence.setMaximum(int(config.persistence_max_size / 1024 / 1024))

That's all.

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

1 participant