LISE-B26 / pylabcontrol

pylabcontrol: Laboratory Equipment Control for Scientific Experiments.
GNU General Public License v3.0
9 stars 9 forks source link

Gui: Saving fails with WindowsError: [Error 2] The system cannot find the file specified #134

Closed akabcenell closed 6 years ago

akabcenell commented 6 years ago

When saving to a good location (such as '\\?\Z:/Lab/Lev/lab_measurements/20180323_sample_6/bead_1/cycle_3\180402-19_41_11_takeimage'), saving fails in save_b26_file due to os.makedirs(os.path.dirname(filename)) failing on these filenames

akabcenell commented 6 years ago

The solution was to remove the \\?\ that was automatically appended to the filepath. This happened just after moving to pyqt5. Unclear why that would cause this though.

asafira commented 6 years ago

I would prefer to close the issue if we can confirm that long save file names don't break...

akabcenell commented 6 years ago

This should be fixed by Script.check_filename, which should be called before all automatic saving in Script. If are the further problems, reopen this issue