IntrAnatSEEGSoftware / IntrAnat

sEEG software
GNU General Public License v3.0
14 stars 6 forks source link

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

Open ftadel opened 6 years ago

ftadel commented 6 years ago

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 commented 6 years ago

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)