mirror of
https://github.com/shizand/statapp.git
synced 2024-12-23 12:12:59 +03:00
fix: исправлена загрузка данных из файла
This commit is contained in:
parent
f603a77130
commit
8b7fabfa46
@ -17,7 +17,7 @@ class FileSLCModel:
|
|||||||
|
|
||||||
def loadFile(self):
|
def loadFile(self):
|
||||||
self.file_name, _ = QFileDialog.getOpenFileName(None, "Загрузить файл", "", "Files (*.txt;*.csv)")
|
self.file_name, _ = QFileDialog.getOpenFileName(None, "Загрузить файл", "", "Files (*.txt;*.csv)")
|
||||||
if not self.file_name:
|
if self.file_name:
|
||||||
try:
|
try:
|
||||||
content = np.genfromtxt(self.file_name, delimiter=',', invalid_raise=True)
|
content = np.genfromtxt(self.file_name, delimiter=',', invalid_raise=True)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
@ -30,4 +30,4 @@ class FileSLCModel:
|
|||||||
|
|
||||||
def closeFile(self):
|
def closeFile(self):
|
||||||
self.file_name = None
|
self.file_name = None
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user