我正在遵循“Python App Engine 入门”教程,但似乎无法连接到开发服务器。当我尝试运行它时,我不断从日志控制台收到以下错误。
2013-08-23 09:46:43 PM Running command: "[u'/usr/bin/python', '/home/mathee/google_appengine/dev_appserver.py', '--admin_console_server=', '--port=8080', '/home/mathee/app']"
usage: dev_appserver.py [-h] [--host HOST] [--port PORT]
[--admin_host ADMIN_HOST] [--admin_port ADMIN_PORT]
[--auth_domain AUTH_DOMAIN] [--storage_path PATH]
[--log_level {debug,info,warning,critical,error}]
[--max_module_instances MAX_MODULE_INSTANCES]
[--use_mtime_file_watcher [USE_MTIME_FILE_WATCHER]]
[--php_executable_path PATH]
[--php_remote_debugging [PHP_REMOTE_DEBUGGING]]
[--python_startup_script PYTHON_STARTUP_SCRIPT]
[--python_startup_args PYTHON_STARTUP_ARGS]
[--blobstore_path BLOBSTORE_PATH]
[--mysql_host MYSQL_HOST] [--mysql_port MYSQL_PORT]
[--mysql_user MYSQL_USER]
[--mysql_password MYSQL_PASSWORD]
[--mysql_socket MYSQL_SOCKET]
[--datastore_path DATASTORE_PATH]
[--clear_datastore [CLEAR_DATASTORE]]
[--datastore_consistency_policy {consistent,random,time}]
[--require_indexes [REQUIRE_INDEXES]]
[--auto_id_policy {sequential,scattered}]
[--logs_path LOGS_PATH]
[--show_mail_body [SHOW_MAIL_BODY]]
[--enable_sendmail [ENABLE_SENDMAIL]]
[--smtp_host SMTP_HOST] [--smtp_port SMTP_PORT]
[--smtp_user SMTP_USER]
[--smtp_password SMTP_PASSWORD]
[--prospective_search_path PROSPECTIVE_SEARCH_PATH]
[--clear_prospective_search [CLEAR_PROSPECTIVE_SEARCH]]
[--search_indexes_path SEARCH_INDEXES_PATH]
[--clear_search_indexes [CLEAR_SEARCH_INDEXES]]
[--enable_task_running [ENABLE_TASK_RUNNING]]
[--allow_skipped_files [ALLOW_SKIPPED_FILES]]
[--api_port API_PORT]
[--automatic_restart [AUTOMATIC_RESTART]]
[--dev_appserver_log_level {debug,info,warning,critical,error}]
[--skip_sdk_update_check [SKIP_SDK_UPDATE_CHECK]]
[--default_gcs_bucket_name DEFAULT_GCS_BUCKET_NAME]
yaml_files [yaml_files ...]
dev_appserver.py: error: unrecognized arguments: --admin_console_server= 2013-08-23 09:46:44 PM (Process exited with code 2)
我在 Ubuntu 12.04 上运行 Python 2.7.3。我尝试过下载并使用 Python 2.7.5 运行,但是我不断收到与上面类似的错误,除了 ImportError 指出没有名为 zlib 的模块。
有了这个问题,我从终端运行 python 2.7.3 并尝试导入它可以工作的 zlib ,但是当我尝试使用 python 2.7.5 进行相同操作时,它失败了,无法找到 zlib 模块。
我已经在这个问题上停留了几个小时,找不到任何可以帮助我的东西。
任何帮助将不胜感激,谢谢!
编辑:好的,我通过终端而不是 Google App Engine 启动器运行开发 Web 服务器,它运行得很好。
我猜这只是启动器中的一个错误。