zmister2016 / MrDoc

mrdoc,online document system developed based on python. It is suitable for individuals and small teams to manage documents, wiki, knowledge and notes. 觅思文档,适合于个人和中小型团队的在线文档、知识库系统。
https://mrdoc.pro/
GNU General Public License v3.0
2.94k stars 549 forks source link

一些bug反馈 #131

Closed fcmxmk closed 2 years ago

fcmxmk commented 2 years ago

1. 启动很快, 关闭需要非常久;

image

2. 搜索不存在的字符串正常, 搜索存在的字符串就会报 500 错误;

image

image

后端日志:

image

程序版本信息

MrDoc 0.7.4

aiocontextvars==0.2.2
beautifulsoup4==4.8.2
certifi==2021.10.8
chardet==3.0.4
cobble==0.1.3
colorama==0.4.4
configparser==5.2.0
contextvars==2.4
crayons==0.4.0
Django==2.2.24
django-haystack==3.1.1
djangorestframework==3.11.2
idna==2.10
immutables==0.16
importlib-metadata==4.8.2
jieba==0.42.1
loguru==0.4.1
lxml==4.6.4
mammoth==1.4.13
Markdown==3.3.3
markdownify==0.6.0
packaging==21.3
Pillow==8.4.0
pyparsing==3.0.6
pytz==2021.3
PyYAML==5.4.1
requests==2.24.0
selenium==3.141.0
setuptools-scm==6.3.2
six==1.16.0
soupsieve==2.3.1
sqlparse==0.4.2
tomli==1.2.2
typing_extensions==4.0.1
urllib3==1.25.11
uWSGI==2.0.20
webdriver-manager==3.3.0
Whoosh==2.7.4
zipp==3.6.0
fcmxmk commented 2 years ago

mrdoc 程序升级到MrDoc 0.7.5, 上面提到的问题依然存在.

fcmxmk commented 2 years ago

问题 2 已经解决

原因是因为代码块内包含了以下代码

re.compile('\d+(?=[a-z]+)').findall(xx)
re.compile(r"\d+(?![a-z]+)").findall(xx)
re.compile(r"(?<=[a-z])\d+").findall(xx)
re.compile(r"(?<![a-z])\d+").findall(xx)
re.compile(r"(?:\d+)").findall(xx)

准确说是因为代码块内包含了下面这行代码

re.compile(r"(?<![a-z])\d+").findall(xx)

删掉这行代码就行了, 奇怪的bug.

补充 问题是发生在 nginx + uwsgi + mrdoc, 如果是直接使用 pycharm 启动 mrdoc, 就不会触发这个 bug

zmister2016 commented 2 years ago

最新代码已修复文档搜索部分情况下500的问题

fcmxmk commented 2 years ago