fix: запуск из папки (py main.py) — убран относительный импорт
editor.py использовал 'from .core import', который не работает при запуске скриптом. Заменено на обычный 'from core import'.
This commit is contained in:
@@ -15,7 +15,7 @@ import os
|
|||||||
import json
|
import json
|
||||||
from typing import Dict, List, Optional
|
from typing import Dict, List, Optional
|
||||||
|
|
||||||
from .core import (
|
from core import (
|
||||||
list_profiles, load_profile, load_settings, save_settings,
|
list_profiles, load_profile, load_settings, save_settings,
|
||||||
scan_excel, extract_data,
|
scan_excel, extract_data,
|
||||||
)
|
)
|
||||||
@@ -345,7 +345,7 @@ class ImportMapperWindow:
|
|||||||
messagebox.showerror("Ошибка", data['error'])
|
messagebox.showerror("Ошибка", data['error'])
|
||||||
return
|
return
|
||||||
|
|
||||||
from .core import EXPORT_DIR
|
from core import EXPORT_DIR
|
||||||
os.makedirs(EXPORT_DIR, exist_ok=True)
|
os.makedirs(EXPORT_DIR, exist_ok=True)
|
||||||
out_path = os.path.join(EXPORT_DIR, f"export_{self.profile['id']}.json")
|
out_path = os.path.join(EXPORT_DIR, f"export_{self.profile['id']}.json")
|
||||||
with open(out_path, 'w', encoding='utf-8') as f:
|
with open(out_path, 'w', encoding='utf-8') as f:
|
||||||
|
|||||||
Reference in New Issue
Block a user