GameSentenceMiner 2.13.7__tar.gz → 2.13.7.post1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/gsm.py +17 -18
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/configuration.py +8 -7
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner.egg-info/PKG-INFO +1 -1
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/PKG-INFO +1 -1
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/pyproject.toml +1 -1
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/__init__.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/ai/__init__.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/ai/ai_prompting.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/anki.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/assets/__init__.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/assets/icon.png +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/assets/icon128.png +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/assets/icon256.png +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/assets/icon32.png +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/assets/icon512.png +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/assets/icon64.png +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/assets/pickaxe.png +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/config_gui.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/gametext.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/locales/en_us.json +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/locales/ja_jp.json +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/locales/zh_cn.json +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/obs.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/ocr/__init__.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/ocr/gsm_ocr_config.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/ocr/ocrconfig.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/ocr/owocr_area_selector.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/ocr/owocr_helper.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/ocr/ss_picker.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/owocr/owocr/__init__.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/owocr/owocr/__main__.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/owocr/owocr/config.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/owocr/owocr/lens_betterproto.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/owocr/owocr/ocr.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/owocr/owocr/run.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/owocr/owocr/screen_coordinate_picker.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/__init__.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/audio_offset_selector.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/communication/__init__.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/communication/send.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/communication/websocket.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/downloader/Untitled_json.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/downloader/__init__.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/downloader/download_tools.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/downloader/oneocr_dl.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/electron_config.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/ffmpeg.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/gsm_utils.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/model.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/notification.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/package.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/ss_selector.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/text_log.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/window_transparency.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/vad.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/web/__init__.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/web/service.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/web/static/__init__.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/web/static/apple-touch-icon.png +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/web/static/favicon-96x96.png +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/web/static/favicon.ico +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/web/static/favicon.svg +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/web/static/site.webmanifest +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/web/static/style.css +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/web/static/web-app-manifest-192x192.png +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/web/static/web-app-manifest-512x512.png +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/web/templates/__init__.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/web/templates/index.html +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/web/templates/text_replacements.html +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/web/templates/utility.html +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/web/texthooking_page.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/wip/get_overlay_coords.py +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner.egg-info/SOURCES.txt +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner.egg-info/dependency_links.txt +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner.egg-info/entry_points.txt +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner.egg-info/requires.txt +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner.egg-info/top_level.txt +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/LICENSE +0 -0
- {gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/setup.cfg +0 -0
@@ -9,6 +9,18 @@ import warnings
|
|
9
9
|
os.environ.pop('TCL_LIBRARY', None)
|
10
10
|
|
11
11
|
|
12
|
+
def handle_error_in_initialization(e):
|
13
|
+
"""Handle errors that occur during initialization."""
|
14
|
+
logger.exception(e, exc_info=True)
|
15
|
+
logger.info(
|
16
|
+
"An error occurred during initialization, Maybe try updating GSM from the menu or if running manually, try installing `pip install --update GameSentenceMiner`")
|
17
|
+
try:
|
18
|
+
while True:
|
19
|
+
time.sleep(1)
|
20
|
+
except KeyboardInterrupt:
|
21
|
+
logger.info("Exiting due to initialization error.")
|
22
|
+
sys.exit(1)
|
23
|
+
|
12
24
|
try:
|
13
25
|
import os.path
|
14
26
|
import signal
|
@@ -45,11 +57,7 @@ try:
|
|
45
57
|
from GameSentenceMiner.web.texthooking_page import run_text_hooker_page
|
46
58
|
except Exception as e:
|
47
59
|
from GameSentenceMiner.util.configuration import logger, is_linux, is_windows
|
48
|
-
|
49
|
-
"Something bad happened during import/initialization, closing in 5 seconds")
|
50
|
-
logger.exception(e)
|
51
|
-
time.sleep(5)
|
52
|
-
sys.exit(1)
|
60
|
+
handle_error_in_initialization(e)
|
53
61
|
|
54
62
|
if is_windows():
|
55
63
|
import win32api
|
@@ -688,11 +696,7 @@ async def async_main(reloading=False):
|
|
688
696
|
except Exception as e:
|
689
697
|
logger.error(f"Error stopping observer: {e}")
|
690
698
|
except Exception as e:
|
691
|
-
|
692
|
-
notification.send_error_notification(
|
693
|
-
"An error occurred during initialization. Check the log for details.")
|
694
|
-
asyncio.sleep(5)
|
695
|
-
raise e
|
699
|
+
handle_error_in_initialization(e)
|
696
700
|
|
697
701
|
|
698
702
|
def main():
|
@@ -701,10 +705,8 @@ def main():
|
|
701
705
|
try:
|
702
706
|
asyncio.run(async_main())
|
703
707
|
except Exception as e:
|
704
|
-
|
705
|
-
|
706
|
-
"An error occurred during initialization, closing in 5 seconds")
|
707
|
-
time.sleep(5)
|
708
|
+
handle_error_in_initialization(e)
|
709
|
+
|
708
710
|
|
709
711
|
|
710
712
|
if __name__ == "__main__":
|
@@ -712,7 +714,4 @@ if __name__ == "__main__":
|
|
712
714
|
try:
|
713
715
|
asyncio.run(async_main())
|
714
716
|
except Exception as e:
|
715
|
-
|
716
|
-
logger.info(
|
717
|
-
"An error occurred during initialization, closing in 5 seconds")
|
718
|
-
time.sleep(5)
|
717
|
+
handle_error_in_initialization(e)
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/configuration.py
RENAMED
@@ -865,7 +865,7 @@ def load_config():
|
|
865
865
|
|
866
866
|
if os.path.exists('config.json') and not os.path.exists(config_path):
|
867
867
|
shutil.copy('config.json', config_path)
|
868
|
-
|
868
|
+
|
869
869
|
if os.path.exists(config_path):
|
870
870
|
try:
|
871
871
|
with open(config_path, 'r') as file:
|
@@ -880,20 +880,21 @@ def load_config():
|
|
880
880
|
config = ProfileConfig.from_dict(config_file)
|
881
881
|
new_config = Config(configs = {DEFAULT_CONFIG : config}, current_profile=DEFAULT_CONFIG)
|
882
882
|
|
883
|
-
|
884
|
-
json.dump(new_config.to_dict(), file, indent=4)
|
883
|
+
config.save()
|
885
884
|
return new_config
|
886
885
|
except json.JSONDecodeError as e:
|
887
|
-
logger.error(f"Error parsing config.json: {e}")
|
888
|
-
|
886
|
+
logger.error(f"Error parsing config.json, saving backup and returning new config: {e}")
|
887
|
+
shutil.copy(config_path, config_path + '.bak')
|
888
|
+
config = Config.new()
|
889
|
+
config.save()
|
890
|
+
return config
|
889
891
|
elif os.path.exists('config.toml'):
|
890
892
|
config = ProfileConfig().load_from_toml('config.toml')
|
891
893
|
new_config = Config({DEFAULT_CONFIG: config}, current_profile=DEFAULT_CONFIG)
|
892
894
|
return new_config
|
893
895
|
else:
|
894
896
|
config = Config.new()
|
895
|
-
|
896
|
-
json.dump(config.to_dict(), file, indent=4)
|
897
|
+
config.save()
|
897
898
|
return config
|
898
899
|
|
899
900
|
|
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/ai/__init__.py
RENAMED
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/ai/ai_prompting.py
RENAMED
File without changes
|
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/assets/__init__.py
RENAMED
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/assets/icon.png
RENAMED
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/assets/icon128.png
RENAMED
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/assets/icon256.png
RENAMED
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/assets/icon32.png
RENAMED
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/assets/icon512.png
RENAMED
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/assets/icon64.png
RENAMED
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/assets/pickaxe.png
RENAMED
File without changes
|
File without changes
|
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/locales/en_us.json
RENAMED
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/locales/ja_jp.json
RENAMED
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/locales/zh_cn.json
RENAMED
File without changes
|
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/ocr/__init__.py
RENAMED
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/ocr/gsm_ocr_config.py
RENAMED
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/ocr/ocrconfig.py
RENAMED
File without changes
|
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/ocr/owocr_helper.py
RENAMED
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/ocr/ss_picker.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/owocr/owocr/config.py
RENAMED
File without changes
|
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/owocr/owocr/ocr.py
RENAMED
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/owocr/owocr/run.py
RENAMED
File without changes
|
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/ffmpeg.py
RENAMED
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/gsm_utils.py
RENAMED
File without changes
|
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/notification.py
RENAMED
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/package.py
RENAMED
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/ss_selector.py
RENAMED
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/util/text_log.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/web/__init__.py
RENAMED
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/web/service.py
RENAMED
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/web/static/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/web/static/favicon.ico
RENAMED
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/web/static/favicon.svg
RENAMED
File without changes
|
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner/web/static/style.css
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner.egg-info/requires.txt
RENAMED
File without changes
|
{gamesentenceminer-2.13.7 → gamesentenceminer-2.13.7.post1}/GameSentenceMiner.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|