2017-09-18 1 views
0

私はan articleを、以下、私の最初のプロジェクトを、作成してい窓に失敗しpserve development.iniの--reload:10 64

私は、以下のコマンドを試しながら、プロセスはループに入り、サーバーを起動して強制終了し、サーバーを再起動して強制終了し、ループを壊したり終了したりせずにこの処理を継続します。以下は

pserve development.ini --reload 

ログ

//--------------------------------------------------------- 
Starting monitor for PID 11912. 
Traceback (most recent call last): 
    File "<string>", line 1, in <module> 
    File "D:\Others\Python\myBlog\lib\site-packages\hupper\ipc.py", line 322, in spawn_main 

    func(**kwargs) 
    File "D:\Others\Python\myBlog\lib\site-packages\hupper\worker.py", line 237, in worker_main 

    func(*spec_args, **spec_kwargs) 
    File "D:\Others\Python\myBlog\lib\site-packages\pyramid\scripts\pserve.py", line 32, in main 

    return command.run() 
    File "D:\Others\Python\myBlog\lib\site-packages\pyramid\scripts\pserve.py", line 229, in run 

    app = loader.get_wsgi_app(app_name, config_vars) 
    File "D:\Others\Python\myBlog\lib\site-packages\plaster_pastedeploy\__init__.py", line 131, in get_wsgi_app 
    global_conf=defaults) 

    File "d:\others\python\myblog\lib\site-packages\paste\deploy\loadwsgi.py", line 247, in loadapp 
    return loadobj(APP, uri, name=name, **kw) 

    File "d:\others\python\myblog\lib\site-packages\paste\deploy\loadwsgi.py", line 271, in loadobj 
    global_conf=global_conf) 

    File "d:\others\python\myblog\lib\site-packages\paste\deploy\loadwsgi.py", line 296, in loadcontext 
    global_conf=global_conf) 

    File "d:\others\python\myblog\lib\site-packages\paste\deploy\loadwsgi.py", line 320, in _loadconfig 
    return loader.get_context(object_type, name, global_conf) 

    File "d:\others\python\myblog\lib\site-packages\paste\deploy\loadwsgi.py", line 450, in get_context 
    global_additions=global_additions) 

    File "d:\others\python\myblog\lib\site-packages\paste\deploy\loadwsgi.py", line 562, in _pipeline_app_context 
    for name in pipeline[:-1]] 

    File "d:\others\python\myblog\lib\site-packages\paste\deploy\loadwsgi.py", line 562, in <listcomp> 
    for name in pipeline[:-1]] 

    File "d:\others\python\myblog\lib\site-packages\paste\deploy\loadwsgi.py", line 406, in get_context 
    global_conf=global_conf) 

    File "d:\others\python\myblog\lib\site-packages\paste\deploy\loadwsgi.py", line 296, in loadcontext 
    global_conf=global_conf) 

    File "d:\others\python\myblog\lib\site-packages\paste\deploy\loadwsgi.py", line 328, in _loadegg 
    return loader.get_context(object_type, name, global_conf) 

    File "d:\others\python\myblog\lib\site-packages\paste\deploy\loadwsgi.py", line 620, in get_context 
    object_type, name=name) 

    File "d:\others\python\myblog\lib\site-packages\paste\deploy\loadwsgi.py", line 646, in find_egg_entry_point 
    possible.append((entry.load(), protocol, entry.name)) 

    File "D:\Others\Python\myBlog\lib\site-packages\pkg_resources\__init__.py", line 2405, in load 
    return self.resolve() 

    File "D:\Others\Python\myBlog\lib\site-packages\pkg_resources\__init__.py", line 2411, in resolve 
    module = __import__(self.module_name, fromlist=['__name__'], level=0) 

    File "D:\Others\Python\myBlog\lib\site-packages\weberror-0.13.1-py3.6.egg\weberror\evalexception.py", line 127 
    except ValueError, ve: 
        ^

SyntaxError: invalid syntax 

Killing server with PID 11912. 

Starting monitor for PID 4564. 

Traceback (most recent call last): 

答えて

2

であるそれはあなたが使用しようとしているライブラリーはPython 3用に構築されていないようexcept SomeException, v:構文は、Python 3ではPythonの2にのみ有効であるに見えますexcept SomeException as v:を使用する必要があります。これをPython 2で実行するか、Python 3をサポートするこのライブラリの新しいバージョンを探してみてください。

Python try...except comma vs 'as' in except