..\Scripts\pserve.exe serve developmen-6ren">
gpt4 book ai didi

python - Pyramid 项目 : "ValueError: Variable assignment..." when trying to pserve

转载 作者:行者123 更新时间:2023-11-28 22:02:18 24 4
gpt4 key购买 nike

尝试运行 Pyramid 项目时出现以下错误。据我所知,这是一夜之间出现的,我不知道如何开始调试它:

C:\mas\mas>..\Scripts\pserve.exe serve development.ini --reload
Starting subprocess with file monitor
Traceback (most recent call last):
File "C:\mas\Scripts\pserve-script.py", line 8, in <module>
load_entry_point('pyramid==1.3.2', 'console_scripts', 'pserve')()
File "C:\mas\lib\site-packages\pyramid-1.3.2-py2.7.egg\pyramid\scripts\pserve.
py", line 47, in main
return command.run()
File "C:\mas\lib\site-packages\pyramid-1.3.2-py2.7.egg\pyramid\scripts\pserve.
py", line 221, in run
vars = self.parse_vars(restvars)
File "C:\mas\lib\site-packages\pyramid-1.3.2-py2.7.egg\pyramid\scripts\pserve.
py", line 330, in parse_vars
% arg)
ValueError: Variable assignment 'development.ini' invalid (no "=")

问题是什么,或者我应该如何确定它?抱歉,我的问题比较含糊,但如果我对自己的问题有更多的了解,我可能已经在 Google 上找到了答案:)。

第 328 - 330 行:

        raise ValueError(
'Variable assignment %r invalid (no "=")'
% arg)

开发.ini

[app:main]
use = egg:mas

pyramid.reload_templates = true
pyramid.debug_authorization = false
pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.default_locale_name = en
pyramid.includes = pyramid_debugtoolbar
pyramid_tm
pyramid_beaker

sqlalchemy.url = sqlite:///%(here)s/mas.db

# Cache settings
cache.regions = default_term, second, short_term, long_term
cache.type = memory
cache.second.expire = 1
cache.short_term.expire = 60
cache.default_term.expire = 300
cache.long_term.expire = 3600

# Beaker sessions
#session.type = file
#session.data_dir = %(here)s/data/sessions/data
#session.lock_dir = %(here)s/data/sessions/lock
session.type = memory
session.key = akhet_demo
session.secret = 0cb243f53ad865a0f70099c0414ffe9cfcfe03ac

[server:main]
use = egg:waitress#main
host = 0.0.0.0
port = 6543

# Begin logging configuration

[loggers]
keys = root, mas, sqlalchemy

[handlers]
keys = console

[formatters]
keys = generic

[logger_root]
level = INFO
handlers = console

[logger_mas]
level = DEBUG
handlers =
qualname = mas

[logger_sqlalchemy]
level = INFO
handlers =
qualname = sqlalchemy.engine
# "level = INFO" logs SQL queries.
# "level = DEBUG" logs SQL queries and results.
# "level = WARN" logs neither. (Recommended for production systems.)

[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic

[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s

# End logging configuration

最佳答案

Ich,我已经解决了,我在错误的地方寻找问题。问题是这个命令:

..\Scripts\pserve.exe serve development.ini --reload

应该是这个命令:

..\Scripts\pserve.exe development.ini --reload

我不知道我的批处理文件是如何或何时更改的,但如果有人有类似的问题,希望这会有所帮助。

关于python - Pyramid 项目 : "ValueError: Variable assignment..." when trying to pserve,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11515273/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com