Procházet zdrojové kódy

解决viewDataAnalysis.py文件logger 代码错误使用self.logger问题

zhouyang.xie před 2 měsíci
rodič
revize
5e7bc97c7d
2 změnil soubory, kde provedl 120 přidání a 1 odebrání
  1. 119 0
      requirements_win11.txt
  2. 1 1
      wtoaamapi/apps/viewDemo/viewDataAnalysis.py

+ 119 - 0
requirements_win11.txt

@@ -0,0 +1,119 @@
+aiohappyeyeballs==2.6.1
+aiohttp==3.11.14
+aiosignal==1.3.2
+argon2-cffi==23.1.0
+argon2-cffi-bindings==21.2.0
+asgiref==3.8.1
+asttokens==3.0.0
+attrs==25.3.0
+backcall==0.2.0
+beautifulsoup4==4.13.3
+bleach==6.2.0
+build==1.2.2.post1
+certifi==2025.1.31
+cffi==1.17.1
+charset-normalizer==3.4.1
+click==8.1.8
+colorama==0.4.6
+contourpy==1.3.1
+cycler==0.12.1
+datasets==3.4.1
+debugpy==1.8.13
+decorator==5.2.1
+defusedxml==0.7.1
+dill==0.3.8
+Django==5.1.7
+djangorestframework==3.15.2
+docopt==0.6.2
+drf-yasg==1.21.10
+executing==2.2.0
+fastjsonschema==2.21.1
+filelock==3.18.0
+fonttools==4.56.0
+frozenlist==1.5.0
+fsspec==2024.12.0
+geographiclib==2.0
+geopy==2.4.1
+greenlet==3.1.1
+huggingface-hub==0.29.3
+idna==3.10
+inflection==0.5.1
+ipython==8.12.3
+jedi==0.19.2
+Jinja2==3.1.6
+jsonschema==4.23.0
+jsonschema-specifications==2024.10.1
+jupyter_client==8.6.3
+jupyter_core==5.7.2
+jupyterlab_pygments==0.3.0
+kaleido==0.1.0.post1
+kiwisolver==1.4.8
+MarkupSafe==3.0.2
+matplotlib==3.10.1
+matplotlib-inline==0.1.7
+minio==7.2.15
+mistune==3.1.2
+modelscope==1.24.0
+multidict==6.2.0
+multiprocess==0.70.16
+narwhals==1.31.0
+nbclient==0.10.2
+nbconvert==7.16.6
+nbformat==5.10.4
+networkx==3.4.2
+numpy==2.2.4
+packaging==24.2
+pandas==2.2.3
+pandocfilters==1.5.1
+parso==0.8.4
+patsy==1.0.1
+pickleshare==0.7.5
+pillow==11.1.0
+pip-tools==7.4.1
+pipdeptree==2.25.1
+pipreqs==0.5.0
+platformdirs==4.3.6
+plotly==5.19.0
+plotly-express==0.4.1
+prompt_toolkit==3.0.50
+propcache==0.3.1
+psutil==7.0.0
+pure_eval==0.2.3
+pyarrow==19.0.1
+pycparser==2.22
+pycryptodome==3.22.0
+Pygments==2.19.1
+PyMySQL==1.1.1
+pyparsing==3.2.1
+pyproject_hooks==1.2.0
+python-dateutil==2.9.0.post0
+pytz==2025.1
+pywin32==310
+PyYAML==6.0.2
+pyzmq==26.3.0
+referencing==0.36.2
+requests==2.32.3
+rpds-py==0.23.1
+scipy==1.15.2
+seaborn==0.13.2
+six==1.17.0
+soupsieve==2.6
+SQLAlchemy==2.0.39
+sqlparse==0.5.3
+stack-data==0.6.3
+statsmodels==0.14.4
+tenacity==9.0.0
+tinycss2==1.4.0
+tornado==6.4.2
+tqdm==4.67.1
+traitlets==5.14.3
+typing_extensions==4.12.2
+tzdata==2025.1
+uritemplate==4.1.1
+urllib3==2.3.0
+wcwidth==0.2.13
+webencodings==0.5.1
+windrose==1.9.2
+xxhash==3.5.0
+yarg==0.1.9
+yarl==1.18.3

+ 1 - 1
wtoaamapi/apps/viewDemo/viewDataAnalysis.py

@@ -93,7 +93,7 @@ class DataAnalysis(ViewSet):
                 # 使用 traceback 模块获取完整的异常信息
                 error_message = ''.join(traceback.format_exception(e1))
                 # 记录异常信息
-                self.logger.error(f"捕获到异常: {error_message}")
+                logger.error(f"捕获到异常: {error_message}")
             
             # 返回包含错误信息的 HTTP 响应,状态码设为 500(内部服务器错误)
             return HttpResponse(f"内部服务器错误: {error_message}", status=500)