Traceback (most recent call last):
前言
最近開發python flask框架時,執行入口檔案報如下錯誤
報錯資訊:
C:\Users\Administrator\.virtualenvs\movie_project-7781sJXo\Scripts\python.exe D:/code/movie_project/manage.py
Traceback (most recent call last):
File "D:\code\movie_project\manage.py", line 10, in <module>
from app import app
File "D:\code\movie_project\app\__init__.py", line 19, in <module>
app.register_blueprint(admin_blueprint, url_prefix="/admin")
File "C:\Users\Administrator\.virtualenvs\movie_project-7781sJXo\lib\site-packages\flask\app.py", line 98, in wrapper_func
return f(self, *args, **kwargs)
File "C:\Users\Administrator\.virtualenvs\movie_project-7781sJXo\lib\site-packages\flask\app.py", line 1157, in register_blueprint
assert self.blueprints[blueprint.name] is blueprint, (
AssertionError: A name collision occurred between blueprints <flask.blueprints.Blueprint object at 0x000002B8830B3730> and <flask.blueprints.Blueprint object at 0x000002B8830B3580>. Both share the same name "home". Blueprints that are created on the fly need unique names.
Process finished with exit code 1
解決:
通過 debug除錯,感覺是我們的模組註冊藍圖時報錯,
原因
在admin 初始化檔案裡面,我寫錯了名稱,需要把下面標紅的“home” 改為"admin"
重新啟動:
相關文章
- Traceback (most recent call last): File "AttributeError: 'NoneType' object has no attribute 'group'ASTErrorNoneObject
- 爬蟲中經常出現Traceback (most recent call last):問題解決!!!爬蟲AST
- Traceback (most recent call last): File "/usr/bin/firewall-cmd", line 24, in from gi.AST
- v$session中LAST_CALL_ET引數的理解SessionAST
- python中的tracebackPython
- Iptables之recent模組小結
- Javascript記憶體溢位,FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memoryJavaScript記憶體溢位ErrorASTAI
- [Most.js] Create Streams From Single Values With Most.jsJS
- Front Most Alfred WorkflowAlfred
- The most influential person
- Leetcode 933 Number of Recent CallsLeetCode
- jQuery last()jQueryAST
- Last WinnerAST
- Last danceAST
- python2 traceback模組原始碼解析Python原始碼
- RuntimeWarning: Enable tracemalloc to get the object allocation tracebackObject
- H. The Most Reckless Defense
- LeetCode之Number of Recent Calls(Kotlin)LeetCodeKotlin
- 理解call和實現call
- 7.121 LASTAST
- Who is the Last Change?AST
- python 用traceback列印錯誤訊息(轉)Python
- E:last-child與E:last-of-type區別AST
- 11. Container With Most WaterAI
- Afterall most women on quite a few skillUI
- jQuery :last-of-typejQueryAST
- jQuery :last-childjQueryAST
- linux命令:lastLinuxAST
- JumpList中Recent類別和自定義型別薦型別
- leetcode Container With Most WaterLeetCodeAI
- Although it does not provide the most Parajumpers On SaleIDE
- JavaScript call()JavaScript
- js callJS
- call() 方法
- __call__
- IPC call
- Last digit of a huge numberASTGit
- CSS E:last-childCSSAST