Load file button bug

Dear @vasilis !

After one of the recent updates of Flair I encounter this problem:

Traceback (most recent call last):
File “/usr/local/flair/tkFlair.py”, line 1363, in call
return self.func(*args)
File “/usr/local/flair/lib/tkExtra.py”, line 567, in invoke
initialdir = self.directory(),
File “/usr/local/flair/lib/tkExtra.py”, line 603, in directory
return os.path.dirname(os.path.join(self.initialdir, self.get()))
File “/usr/lib/python3.8/posixpath.py”, line 76, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not tuple

This happens after I click on the load file button:

So, I can’t choose the path to the file. Sometimes this happens on the “Plot” tab as well.


Many thanks @Ivan

Indeed there was a typo, a trailing comma in a command that was supplying the project directory to the File dialog, resulted the directory to appear as tuple and not a string.

I will push a fix quite soon, in the mean time if you want to continue working you could edit the GeometryLayers.py and on line 2374 remove the trailing comma
self.imageFile.initialdir = self.project.dir(),
in order to look like:
self.imageFile.initialdir = self.project.dir()

1 Like

Really appreciate you work, @vasilis ! Thanks a lot! Have a nice day!

Best wishes,