mirror of
https://github.com/shizand/statapp.git
synced 2025-04-01 23:23:45 +03:00
fix #56
This commit is contained in:
parent
4854a14e70
commit
e275a80177
@ -19,12 +19,13 @@ class FileSLCModel:
|
||||
self.file_name, _ = QFileDialog.getOpenFileName(None, "Загрузить файл", "", "Files (*.txt *.csv)")
|
||||
if self.file_name:
|
||||
try:
|
||||
content = np.genfromtxt(self.file_name, delimiter=',', invalid_raise=True)
|
||||
content = np.genfromtxt(self.file_name, delimiter=',', invalid_raise=True, ndmin=2)
|
||||
except ValueError as e:
|
||||
QMessageBox.warning \
|
||||
(None,
|
||||
'Ошибка',
|
||||
"Ошибка чтения файла!\nФайл нельзя открыть или файл неверного формата")
|
||||
self.file_name = None
|
||||
return None
|
||||
return content
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user