mirror of
https://github.com/slatinsky/DiscordChatExporter-frontend.git
synced 2025-05-11 10:27:00 +02:00
be - preprocess - fix path limit crash
This commit is contained in:
parent
969445791d
commit
ca633b7449
3 changed files with 6 additions and 2 deletions
|
@ -4,4 +4,4 @@ import multiprocessing
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
multiprocessing.freeze_support() # for windows https://stackoverflow.com/a/67590514
|
multiprocessing.freeze_support() # for windows https://stackoverflow.com/a/67590514
|
||||||
uvicorn.run("src.main:app", host="0.0.0.0", port=58000, reload=False, workers=4)
|
uvicorn.run("src.main:app", host="0.0.0.0", port=58000, reload=False, workers=1, loop="asyncio")
|
|
@ -404,7 +404,11 @@ class JsonProcessor:
|
||||||
json_path_with_base_dir = self.file_finder.add_base_directory(json_path)
|
json_path_with_base_dir = self.file_finder.add_base_directory(json_path)
|
||||||
|
|
||||||
# get file size
|
# get file size
|
||||||
file_size = os.path.getsize(json_path_with_base_dir)
|
try:
|
||||||
|
file_size = os.path.getsize(json_path_with_base_dir)
|
||||||
|
except FileNotFoundError:
|
||||||
|
print(f' ERROR: FileNotFoundError - path is probably longer than 260 chars')
|
||||||
|
file_size = 0
|
||||||
|
|
||||||
# get date modified
|
# get date modified
|
||||||
date_modified = os.path.getmtime(json_path_with_base_dir)
|
date_modified = os.path.getmtime(json_path_with_base_dir)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue