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
- python中的tracebackPython
- Leetcode 933 Number of Recent CallsLeetCode
- Javascript記憶體溢位,FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memoryJavaScript記憶體溢位ErrorASTAI
- The most influential person
- [Most.js] Create Streams From Single Values With Most.jsJS
- LeetCode之Number of Recent Calls(Kotlin)LeetCodeKotlin
- RuntimeWarning: Enable tracemalloc to get the object allocation tracebackObject
- 7.121 LASTAST
- Last danceAST
- Iptables之recent模組小結
- Leetcode 11 Container With Most WaterLeetCodeAI
- H. The Most Reckless Defense
- E:last-child與E:last-of-type區別AST
- LeetCode 11. Container With Most WaterLeetCodeAI
- 508-Most Frequent Subtree Sum
- leetcode_11. Container With Most WaterLeetCodeAI
- 【Lintcode】1484. The Most Frequent Word
- python2 traceback模組原始碼解析Python原始碼
- python 用traceback列印錯誤訊息(轉)Python
- 7.122 LAST_DAYAST
- Last digit of a huge numberASTGit
- 理解call和實現call
- 【Leetcode】1673. Find the Most Competitive SubsequenceLeetCode
- LeetCode - Medium - 11. Container With Most WaterLeetCodeAI
- Linux基礎命令—lastLinuxAST
- Linux基礎命令---lastLinuxAST
- CSS E:last-childCSSAST
- CSS E:last-of-typeCSSAST
- [leetcode]length-of-last-wordLeetCodeAST
- 天國的《The Last Night》AST
- The Buffalo Bills may be the third most popular team in their nation
- LeetCode Container With Most Water(011)解法總結LeetCodeAI
- [LeetCode] 2070. Most Beautiful Item for Each QueryLeetCode
- JavaScript call()JavaScript
- call() 方法
- IPC call