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

UnboundLocalError: local variable 'tmp_nii_path' referenced before assignment #4

Open
ftadel opened this issue Mar 15, 2018 · 1 comment

Comments

@ftadel
Copy link
Contributor

ftadel commented Mar 15, 2018

At each import of a new volume, I get this error:

Loading /mnt/f/RawData/Epileptogenicity/TELe/Implantation1/Gre_2016_TELe/t1mri/T1pre_2015-12-18/Gre_2016_TELe.nii
QPixmap::setMask() mask size differs from pixmap size
Traceback (most recent call last):
  File "/home/ftadel/IntrAnat/IntrAnat/ImageImportWindow.py", line 1302, in chooseNifti
    self.ui.niftiFileLabel.setText(tmp_nii_path)
UnboundLocalError: local variable 'tmp_nii_path' referenced before assignment

But it's not blocking, and it seems to be importing everything correctly.
Should I be worried about this?

@pdeman
Copy link
Contributor

pdeman commented Mar 15, 2018

I am correcting it but it's not a problem don't worry.
it's a variable used when importing .mgz because it goes through a temporary file (conversion in nifti) before the real importation of the nifti if validate by the user.

when not importing .mgz the tmp_nii_path is not defined but not really used. (self.ui.niftiFileLabel.setText is the Qt label on the interface reminding the user which file is opened)

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