mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
Apply workaround for wasyncore error
This commit is contained in:
parent
862dfd639d
commit
7d37fe3daf
1 changed files with 5 additions and 0 deletions
|
@ -13,12 +13,14 @@ import threading
|
||||||
import time
|
import time
|
||||||
import traceback
|
import traceback
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
from errno import EPROTOTYPE
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
from typing import Callable
|
from typing import Callable
|
||||||
|
|
||||||
import flask
|
import flask
|
||||||
import flask_cors
|
import flask_cors
|
||||||
import stringcase
|
import stringcase
|
||||||
|
import waitress.wasyncore
|
||||||
from flask import Response, abort, request
|
from flask import Response, abort, request
|
||||||
from waitress.server import create_server
|
from waitress.server import create_server
|
||||||
|
|
||||||
|
@ -38,6 +40,9 @@ from aqt.progress import ProgressUpdate
|
||||||
from aqt.qt import *
|
from aqt.qt import *
|
||||||
from aqt.utils import aqt_data_path, show_warning, tr
|
from aqt.utils import aqt_data_path, show_warning, tr
|
||||||
|
|
||||||
|
# https://forums.ankiweb.net/t/anki-crash-when-using-a-specific-deck/22266
|
||||||
|
waitress.wasyncore._DISCONNECTED = waitress.wasyncore._DISCONNECTED.union({EPROTOTYPE}) # type: ignore
|
||||||
|
|
||||||
app = flask.Flask(__name__, root_path="/fake")
|
app = flask.Flask(__name__, root_path="/fake")
|
||||||
flask_cors.CORS(app, resources={r"/*": {"origins": "127.0.0.1"}})
|
flask_cors.CORS(app, resources={r"/*": {"origins": "127.0.0.1"}})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue