如何用 KindleEar 推送无 RSS 的网站内容(上篇)

“Kindle推送”相关阅读

给这篇文章写一条留言

提示:带 * 标记的是必填项。您填写的邮箱地址将会被保密。首次留言将会在通过人工审核后显示。如果是提出问题,请务必提供尽可能多信息,这有助于他人更好地理解你所提出的问题。

小伙伴们写下了 72 条留言

  1. C:\Users\Administrator>dev_appserver.py ./app.yaml ./module-worker.yaml
    This action requires the installation of components: [app-engine-
    python, cloud-datastore-emulator]
    
    
    Your current Cloud SDK version is: 299.0.0
    Installing components from version: 299.0.0
    
    +---------------------------------------------------+
    |        These components will be installed.        |
    +------------------------------+---------+----------+
    |             Name             | Version |   Size   |
    +------------------------------+---------+----------+
    | Cloud Datastore Emulator     |   2.1.0 | 18.4 MiB |
    | gRPC python library          |  1.20.0 |  1.5 MiB |
    | gRPC python library          |         |          |
    | gcloud app Python Extensions |  1.9.91 |  6.1 MiB |
    +------------------------------+---------+----------+
    
    For the latest full release notes, please visit:
      https://cloud.google.com/sdk/release_notes
    
    Do you want to continue (Y/n)?  y
    
    #============================================================#
    #= Creating update staging area                             =#
    #============================================================#
    Traceback (most recent call last):
      File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\dev_appserv
    er.py", line 81, in 
        exceptions.HandleError(e, 'dev_appserver')
      File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloud
    sdk\calliope\exceptions.py", line 521, in HandleError
        core_exceptions.reraise(exc)
      File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloud
    sdk\core\exceptions.py", line 146, in reraise
        six.reraise(type(exc_value), exc_value, tb)
      File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\dev_appserv
    er.py", line 79, in 
        main()
      File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\dev_appserv
    er.py", line 35, in main
        command=__file__)
      File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloud
    sdk\core\updater\update_manager.py", line 204, in EnsureInstalledAndRestart
        return manager._EnsureInstalledAndRestart(components, msg, command)
      File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloud
    sdk\core\updater\update_manager.py", line 1412, in _EnsureInstalledAndRestart
        restart_args=restart_args):
      File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloud
    sdk\core\updater\update_manager.py", line 854, in Install
        restart_args=restart_args)
      File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloud
    sdk\core\updater\update_manager.py", line 971, in Update
        staging_state = install_state.CloneToStaging(pb.SetProgress)
      File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloud
    sdk\core\updater\local_state.py", line 104, in _TryFunc
        return func(*args, **kwargs)
      File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloud
    sdk\core\updater\local_state.py", line 336, in CloneToStaging
        ignore=ticker)
      File "C:\Python27\lib\shutil.py", line 231, in copytree
        raise Error, errors
    shutil.Error: [(u'C:\\Program Files (x86)\\Google\\Cloud SDK\\google-cloud-sdk\\
    platform\\gsutil\\third_party\\funcsigs\\docs\\index.rst', u'C:\\Program Files (
    x86)\\Google\\Cloud SDK\\google-cloud-sdk.staging\\platform\\gsutil\\third_party
    \\funcsigs\\docs\\index.rst', "[Errno 22] invalid mode ('rb') or filename: u'C:\
    \\\Program Files (x86)\\\\Google\\\\Cloud SDK\\\\google-cloud-sdk\\\\platform\\\
    \gsutil\\\\third_party\\\\funcsigs\\\\docs\\\\index.rst'"), (u'C:\\Program Files
     (x86)\\Google\\Cloud SDK\\google-cloud-sdk\\platform\\gsutil\\third_party\\mock
    \\docs\\changelog.txt', u'C:\\Program Files (x86)\\Google\\Cloud SDK\\google-clo
    ud-sdk.staging\\platform\\gsutil\\third_party\\mock\\docs\\changelog.txt', "[Err
    no 22] invalid mode ('rb') or filename: u'C:\\\\Program Files (x86)\\\\Google\\\
    \Cloud SDK\\\\google-cloud-sdk\\\\platform\\\\gsutil\\\\third_party\\\\mock\\\\d
    ocs\\\\changelog.txt'")]

    最后一步出现这个错误,请帮忙解决,非常感谢。

    • 命令提示符是使用管理员身份运行的吗,如果不是的话,使用管理员身份运行,再运行命令试试看。

  2. 这个怎么办

    DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
    Requirement already satisfied: lxml in c:\python\lib\site-packages (4.5.0)
    Requirement already satisfied: pillow in c:\python\lib\site-packages (6.2.2)
    Requirement already satisfied: jinja2 in c:\python\lib\site-packages (2.11.1)
    Requirement already satisfied: pycrypto in c:\python\lib\site-packages (2.6.1)
    Requirement already satisfied: MarkupSafe>=0.23 in c:\python\lib\site-packages (from jinja2) (1.1.1)
  3. 您好我提示这个是为什么啊
    Last login: Sun Mar 29 11:43:49 on ttys000
    joii@huoguowa ~ % cd /Users/joii/Desktop/KindleEar
    joii@huoguowa KindleEar % dev_appserver.py ./app.yaml ./module-worker.yaml
    INFO 2020-03-29 03:46:04,778 sdk_update_checker.py:231] Checking for updates to the SDK.
    INFO 2020-03-29 03:46:04,788 __init__.py:125] Connecting through tunnel to: appengine.google.com:443
    Traceback (most recent call last):
    File “/usr/local/bin/dev_appserver.py”, line 96, in
    _run_file(__file__, globals())
    File “/usr/local/bin/dev_appserver.py”, line 90, in _run_file
    execfile(_PATHS.script_file(script_name), globals_)
    File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py”, line 600, in
    main()
    File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py”, line 588, in main
    dev_server.start(options)
    File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py”, line 355, in start
    configuration.modules[0].application_root)
    File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/api_server.py”, line 654, in create_api_server
    if options.support_datastore_emulator else None)
    File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/stub_util.py”, line 166, in setup_stubs
    oauth_url=appidentity_oauth_url)
    File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/app_identity/app_identity_stub.py”, line 199, in Create
    dc = ai_stub.DefaultCredentialsBasedAppIdentityServiceStub()
    File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/app_identity/app_identity_defaultcredentialsbased_stub.py”, line 76, in __init__
    client.GoogleCredentials.get_application_default())
    File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/oauth2client_devserver/oauth2client/client.py”, line 1036, in get_application_default
    env_name = _get_environment()
    File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/oauth2client_devserver/oauth2client/client.py”, line 924, in _get_environment
    response = urllib2_urlopen(‘http://metadata.google.internal’)
    File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py”, line 154, in urlopen
    return opener.open(url, data, timeout)
    File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py”, line 429, in open
    response = self._open(req, data)
    File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py”, line 447, in _open
    ‘_open’, req)
    File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py”, line 407, in _call_chain
    result = func(*args)
    File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py”, line 1228, in http_open
    return self.do_open(httplib.HTTPConnection, req)
    File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py”, line 1201, in do_open
    r = h.getresponse(buffering=True)
    File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py”, line 1121, in getresponse
    response.begin()
    File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py”, line 438, in begin
    version, status, reason = self._read_status()
    File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py”, line 402, in _read_status
    raise BadStatusLine(“No status line received – the server has closed the connection”)
    httplib.BadStatusLine: No status line received – the server has closed the connection
    joii@huoguowa KindleEar % dev_appserver.py ./app.yaml ./module-worker.yaml
    INFO 2020-03-29 03:55:29,839 sdk_update_checker.py:231] Checking for updates to the SDK.
    INFO 2020-03-29 03:55:29,848 __init__.py:125] Connecting through tunnel to: appengine.google.com:443
    Traceback (most recent call last):
    File “/usr/local/bin/dev_appserver.py”, line 96, in
    _run_file(__file__, globals())
    File “/usr/local/bin/dev_appserver.py”, line 90, in _run_file
    execfile(_PATHS.script_file(script_name), globals_)
    File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py”, line 600, in
    main()
    File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py”, line 588, in main
    dev_server.start(options)
    File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py”, line 355, in start
    configuration.modules[0].application_root)
    File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/api_server.py”, line 654, in create_api_server
    if options.support_datastore_emulator else None)
    File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/stub_util.py”, line 166, in setup_stubs
    oauth_url=appidentity_oauth_url)
    File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/app_identity/app_identity_stub.py”, line 199, in Create
    dc = ai_stub.DefaultCredentialsBasedAppIdentityServiceStub()
    File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/app_identity/app_identity_defaultcredentialsbased_stub.py”, line 76, in __init__
    client.GoogleCredentials.get_application_default())
    File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/oauth2client_devserver/oauth2client/client.py”, line 1036, in get_application_default
    env_name = _get_environment()
    File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/oauth2client_devserver/oauth2client/client.py”, line 924, in _get_environment
    response = urllib2_urlopen(‘http://metadata.google.internal’)
    File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py”, line 154, in urlopen
    return opener.open(url, data, timeout)
    File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py”, line 429, in open
    response = self._open(req, data)
    File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py”, line 447, in _open
    ‘_open’, req)
    File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py”, line 407, in _call_chain
    result = func(*args)
    File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py”, line 1228, in http_open
    return self.do_open(httplib.HTTPConnection, req)
    File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py”, line 1201, in do_open
    r = h.getresponse(buffering=True)
    File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py”, line 1121, in getresponse
    response.begin()
    File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py”, line 438, in begin
    version, status, reason = self._read_status()
    File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py”, line 402, in _read_status
    raise BadStatusLine(“No status line received – the server has closed the connection”)
    httplib.BadStatusLine: No status line received – the server has closed the connection

    • 又提示了这个
      Last login: Sun Mar 29 12:06:46 on ttys000
      joii@huoguowa ~ % cd /Users/YOURNAME/Desktop/KindleEar
      cd: no such file or directory: /Users/YOURNAME/Desktop/KindleEar
      joii@huoguowa ~ % cd /Users/joii/Desktop/KindleEar
      joii@huoguowa KindleEar % dev_appserver.py ./app.yaml ./module-worker.yaml
      INFO 2020-03-29 04:07:29,018 sdk_update_checker.py:231] Checking for updates to the SDK.
      INFO 2020-03-29 04:07:32,036 sdk_update_checker.py:247] Update check failed:
      INFO 2020-03-29 04:07:32,271 api_server.py:275] Starting API server at: http://localhost:53415
      INFO 2020-03-29 04:07:32,279 dispatcher.py:256] Starting module “default” running at: http://localhost:8080
      INFO 2020-03-29 04:07:32,300 dispatcher.py:256] Starting module “worker” running at: http://localhost:8081
      INFO 2020-03-29 04:07:32,302 admin_server.py:150] Starting admin server at: http://localhost:8000
      INFO 2020-03-29 04:07:34,435 instance.py:294] Instance PID: 2131
      WARNING 2020-03-29 04:08:10,560 __init__.py:40] Book ‘FTChinese’ import failed : No module named lxml.etree
      WARNING 2020-03-29 04:08:10,566 __init__.py:40] Book ‘Economist’ import failed : No module named lxml.etree
      WARNING 2020-03-29 04:08:10,583 __init__.py:40] Book ‘ZhihuDaily’ import failed : No module named lxml.etree
      WARNING 2020-03-29 04:08:10,587 __init__.py:40] Book ‘nfzm’ import failed : No module named lxml.etree
      WARNING 2020-03-29 04:08:10,592 __init__.py:40] Book ‘Aisixiang’ import failed : No module named lxml.etree
      WARNING 2020-03-29 04:08:10,598 __init__.py:40] Book ‘Dapenti’ import failed : No module named lxml.etree
      WARNING 2020-03-29 04:08:10,603 __init__.py:40] Book ‘Xueqiu’ import failed : No module named lxml.etree
      WARNING 2020-03-29 04:08:10,607 __init__.py:40] Book ‘Lifeweek’ import failed : No module named lxml.etree
      WARNING 2020-03-29 04:08:10,613 __init__.py:40] Book ‘TEDxBohaiBay’ import failed : No module named lxml.etree
      WARNING 2020-03-29 04:08:10,665 __init__.py:40] Book ‘cn3k5.WenDing’ import failed : No module named lxml.etree
      WARNING 2020-03-29 04:08:10,672 __init__.py:40] Book ‘biquge.NiLiu’ import failed : No module named lxml.etree
      WARNING 2020-03-29 04:08:10,677 __init__.py:40] Book ‘biquge.XiuZhen’ import failed : No module named lxml.etree
      WARNING 2020-03-29 04:08:10,681 __init__.py:40] Book ‘biquge.JianTu’ import failed : No module named lxml.etree
      WARNING 2020-03-29 04:08:10,689 __init__.py:40] Book ‘biquge.DaWang’ import failed : No module named lxml.etree
      WARNING 2020-03-29 04:08:10,696 __init__.py:40] Book ‘biquge.JianLing’ import failed : No module named lxml.etree
      ERROR 2020-03-29 04:08:10,772 wsgi.py:263]
      Traceback (most recent call last):
      File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py”, line 240, in Handle
      handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
      File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py”, line 299, in _LoadHandler
      handler, path, err = LoadObject(self._handler)
      File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py”, line 96, in LoadObject
      __import__(cumulative_path)
      File “/Users/joii/Desktop/KindleEar/apps/module_front.py”, line 47, in
      from apps.View import *
      File “/Users/joii/Desktop/KindleEar/apps/View/__init__.py”, line 14, in
      module = loader.find_module(name).load_module(name)
      File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py”, line 243, in load_module
      mod = imp.load_module(fullname, self.file, self.filename, self.etc)
      File “/Users/joii/Desktop/KindleEar/apps/View/Adv.py”, line 14, in
      from PIL import Image
      ImportError: No module named PIL
      INFO 2020-03-29 04:08:10,783 module.py:861] default: “GET / HTTP/1.1” 500 –
      INFO 2020-03-29 04:08:10,915 module.py:861] default: “GET /favicon.ico HTTP/1.1” 200 4286
      ERROR 2020-03-29 04:08:30,639 wsgi.py:263]
      Traceback (most recent call last):
      File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py”, line 240, in Handle
      handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
      File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py”, line 299, in _LoadHandler
      handler, path, err = LoadObject(self._handler)
      File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py”, line 96, in LoadObject
      __import__(cumulative_path)
      File “/Users/joii/Desktop/KindleEar/apps/module_front.py”, line 47, in
      from apps.View import *
      File “/Users/joii/Desktop/KindleEar/apps/View/__init__.py”, line 14, in
      module = loader.find_module(name).load_module(name)
      File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py”, line 243, in load_module
      mod = imp.load_module(fullname, self.file, self.filename, self.etc)
      File “/Users/joii/Desktop/KindleEar/apps/View/Adv.py”, line 14, in
      from PIL import Image
      ImportError: No module named PIL
      INFO 2020-03-29 04:08:30,649 module.py:861] default: “GET / HTTP/1.1” 500 –

  4. MacOS High Sierra运行pip install lxml pillow jinja2 pycrypto:

    ERROR: Exception:
    Traceback (most recent call last):
    File “/Library/Python/2.7/site-packages/pip-19.2.2-py2.7.egg/pip/_internal/cli/base_command.py”, line 188, in main
    status = self.run(options, args)
    File “/Library/Python/2.7/site-packages/pip-19.2.2-py2.7.egg/pip/_internal/commands/install.py”, line 345, in run
    resolver.resolve(requirement_set)
    File “/Library/Python/2.7/site-packages/pip-19.2.2-py2.7.egg/pip/_internal/legacy_resolve.py”, line 196, in resolve
    self._resolve_one(requirement_set, req)
    File “/Library/Python/2.7/site-packages/pip-19.2.2-py2.7.egg/pip/_internal/legacy_resolve.py”, line 359, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
    File “/Library/Python/2.7/site-packages/pip-19.2.2-py2.7.egg/pip/_internal/legacy_resolve.py”, line 307, in _get_abstract_dist_for
    self.require_hashes
    File “/Library/Python/2.7/site-packages/pip-19.2.2-py2.7.egg/pip/_internal/operations/prepare.py”, line 199, in prepare_linked_requirement
    progress_bar=self.progress_bar
    File “/Library/Python/2.7/site-packages/pip-19.2.2-py2.7.egg/pip/_internal/download.py”, line 1064, in unpack_url
    progress_bar=progress_bar
    File “/Library/Python/2.7/site-packages/pip-19.2.2-py2.7.egg/pip/_internal/download.py”, line 924, in unpack_http_url
    progress_bar)
    File “/Library/Python/2.7/site-packages/pip-19.2.2-py2.7.egg/pip/_internal/download.py”, line 1152, in _download_http_url
    _download_url(resp, link, content_file, hashes, progress_bar)
    File “/Library/Python/2.7/site-packages/pip-19.2.2-py2.7.egg/pip/_internal/download.py”, line 861, in _download_url
    hashes.check_against_chunks(downloaded_chunks)
    File “/Library/Python/2.7/site-packages/pip-19.2.2-py2.7.egg/pip/_internal/utils/hashes.py”, line 75, in check_against_chunks
    for chunk in chunks:
    File “/Library/Python/2.7/site-packages/pip-19.2.2-py2.7.egg/pip/_internal/download.py”, line 829, in written_chunks
    for chunk in chunks:
    File “/Library/Python/2.7/site-packages/pip-19.2.2-py2.7.egg/pip/_internal/utils/ui.py”, line 156, in iter
    for x in it:
    File “/Library/Python/2.7/site-packages/pip-19.2.2-py2.7.egg/pip/_internal/download.py”, line 818, in resp_read
    decode_content=False):
    File “/Library/Python/2.7/site-packages/pip-19.2.2-py2.7.egg/pip/_vendor/urllib3/response.py”, line 531, in stream
    data = self.read(amt=amt, decode_content=decode_content)
    File “/Library/Python/2.7/site-packages/pip-19.2.2-py2.7.egg/pip/_vendor/urllib3/response.py”, line 496, in read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
    File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py”, line 35, in __exit__
    self.gen.throw(type, value, traceback)
    File “/Library/Python/2.7/site-packages/pip-19.2.2-py2.7.egg/pip/_vendor/urllib3/response.py”, line 411, in _error_catcher
    raise ReadTimeoutError(self._pool, None, ‘Read timed out.’)
    ReadTimeoutError: HTTPSConnectionPool(host=’files.pythonhosted.org’, port=443): Read timed out.

      • 运行localhost:8000正常,8080报以下错误:

        ERROR 2020-01-15 09:18:12,906 wsgi.py:263]
        Traceback (most recent call last):
        File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py”, line 240, in Handle
        handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
        File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py”, line 299, in _LoadHandler
        handler, path, err = LoadObject(self._handler)
        File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py”, line 96, in LoadObject
        __import__(cumulative_path)
        File “/Users/liuweiming/Desktop/KindleEar/apps/module_front.py”, line 47, in
        from apps.View import *
        File “/Users/liuweiming/Desktop/KindleEar/apps/View/__init__.py”, line 14, in
        module = loader.find_module(name).load_module(name)
        File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py”, line 246, in load_module
        mod = imp.load_module(fullname, self.file, self.filename, self.etc)
        File “/Users/liuweiming/Desktop/KindleEar/apps/View/Adv.py”, line 14, in
        from PIL import Image
        ImportError: No module named PIL
        INFO 2020-01-15 09:18:12,912 module.py:861] default: “GET / HTTP/1.1” 500 –
        ERROR 2020-01-15 09:18:13,363 wsgi.py:263]
        Traceback (most recent call last):
        File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py”, line 240, in Handle
        handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
        File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py”, line 299, in _LoadHandler
        handler, path, err = LoadObject(self._handler)
        File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py”, line 96, in LoadObject
        __import__(cumulative_path)
        File “/Users/liuweiming/Desktop/KindleEar/apps/module_front.py”, line 47, in
        from apps.View import *
        File “/Users/liuweiming/Desktop/KindleEar/apps/View/__init__.py”, line 14, in
        module = loader.find_module(name).load_module(name)
        File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py”, line 246, in load_module
        mod = imp.load_module(fullname, self.file, self.filename, self.etc)
        File “/Users/liuweiming/Desktop/KindleEar/apps/View/Adv.py”, line 14, in
        from PIL import Image
        ImportError: No module named PIL
        INFO 2020-01-15 09:18:13,371 module.py:861] default: “GET / HTTP/1.1” 500 –

        • 再次运行下载lmxl,提示:

          ERROR: Could not find a version that satisfies the requirement lxml (from versions: none)
          ERROR: No matching distribution found for lxml

          • 安装 Python 2.7,直接运行 brew install python@2 就可以了。

            没有成功安装相关依赖就会出现 ImportError 错误,也就是类似你提供的第二个错误提示信息。

            你贴出的第一个错误提示信息中有 Read timed out 字样,大概是因为网络问题导致无法正常安装依赖包,建议你重试几次 pip 安装命令,还不行的话就只能挂代理了。

                • File "/usr/local/bin/dev_appserver.py", line 96, in 
                      _run_file(__file__, globals())
                    File "/usr/local/bin/dev_appserver.py", line 90, in _run_file
                      execfile(_PATHS.script_file(script_name), globals_)
                    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 600, in 
                      main()
                    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 588, in main
                      dev_server.start(options)
                    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 360, in start
                      options.api_host, apiserver.port, wsgi_request_info_)
                    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/dispatcher.py", line 249, in start
                      _service.start()
                    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/module.py", line 1332, in start
                      self._balanced_module.start()
                    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/wsgi_server.py", line 406, in start
                      raise BindError('Unable to bind %s:%s' % self.bind_addr)
                  google.appengine.tools.devappserver2.wsgi_server.BindError: Unable to bind localhost:8080

                  这是怎么了?

  5. 您好,现在运行不了KindleEar,百度也找不到解决办法,请问一下该怎么办?
    c:\KindleEar>dev_appserver.py ./app.yaml ./module-worker.yaml
    INFO 2019-09-18 19:18:59,980 sdk_update_checker.py:231] Checking for updates to the SDK.
    INFO 2019-09-18 19:19:06,515 sdk_update_checker.py:247] Update check failed:
    WARNING 2019-09-18 19:19:06,516 devappserver2.py:291] The default encoding of your local Python interpreter is set to ‘gbk’ while App Engine’s production environment uses ‘ascii’; as a result your code may behave differently when deployed.
    Traceback (most recent call last):
    File “C:\Program Files (x86)\Google\google_appengine\dev_appserver.py”, line 96, in
    _run_file(__file__, globals())
    File “C:\Program Files (x86)\Google\google_appengine\dev_appserver.py”, line 90, in _run_file
    execfile(_PATHS.script_file(script_name), globals_)
    File “C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py”, line 600, in
    main()
    File “C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py”, line 588, in main
    dev_server.start(options)
    File “C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py”, line 355, in start
    configuration.modules[0].application_root)
    File “C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\api_server.py”, line 654, in create_api_server
    if options.support_datastore_emulator else None)
    File “C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\stub_util.py”, line 201, in setup_stubs
    consistency_policy=datastore_consistency))
    File “C:\Program Files (x86)\Google\google_appengine\google\appengine\datastore\datastore_sqlite_stub.py”, line 618, in __init__
    factory=sql_conn)
    sqlite3.OperationalError: unable to open database file

    • 错误提示找不到 sqlite 数据库,可能因为某种原因(比如用什么软件清理过系统垃圾)删除了之前生成的数据库,导致运行环境找不到它。你可以尝试在运行 dev_appserver.py 命令的时候加上一个参数 --clear_datastore 让本地运行环境重建包括数据库在内的所有数据。

  6. 你好,非常感谢分享。
    但是我到最后一步的时候卡住了。
    dev_appserver.py ./app.yaml ./module-worker.yaml
    输入后显示的是
    ‘dev_appserver.py’ 不是内部或外部命令,也不是可运行的程序
    或批处理文件。
    因为我没有什么编程基础,这个问题怎么处理呢?我看了一下下载目录里面确实找不到’dev_appserver.py’ 。
    谢谢!

    • 首先你需要确认,已经安装了 APP Engine SDK。然后还需要确认,已经按照本文第三部分的第 3 个步骤的说明,根据不同类型的系统,把 SDK 的可执行程序所在目录添加进了环境变量。

  7. 192:KindleEar #### $ dev_appserver.py ./app.yaml ./module-worker.yaml
    INFO     2019-06-25 11:31:48,475 sdk_update_checker.py:231] Checking for updates to the SDK.
    INFO     2019-06-25 11:31:54,507 sdk_update_checker.py:247] Update check failed: 
    INFO     2019-06-25 11:31:54,605 api_server.py:275] Starting API server at: http://localhost:50852
    INFO     2019-06-25 11:31:54,614 dispatcher.py:256] Starting module "default" running at: http://localhost:8080
    INFO     2019-06-25 11:31:54,673 dispatcher.py:256] Starting module "worker" running at: http://localhost:8081
    INFO     2019-06-25 11:31:54,681 admin_server.py:150] Starting admin server at: http://localhost:8000
    INFO     2019-06-25 11:31:56,857 instance.py:294] Instance PID: 76635

    我发现我的除了跟你的PID数字显示不同,其他的都一样,
    但是我的http://localhost:8000页面打开,跟你的不一样,
    这是我的截屏,我的电脑是Mac,
    ![截屏](https://i.loli.net/2019/06/25/5d1206fea338971610.png)

    • 截图界面是 worker 模块,但是你给出的日志 default 模块的端口确实是 8000。你可以点击截图页面中的 default 连接看看它到底是用的哪个端口。

    • 出现这个WARNING 2019-05-30 09:15:24,132 simple_search_stub.py:1196] Could not read search indexes from c:\users\lzlyv\appdata\local\temp\appengine.kindleear\search_indexes

  8. 您好,有一个问题想问一下:
    在执行代码:dev_appserver.py ./app.yaml ./module-worker.yaml
    显示:
    WARNING:Your python27 micro version is below 2.7.12, our current production version.
    电脑系统是MacOS10.14.4,这个命令执行的时候应该是电脑自带的默认python2版本,
    我应该怎么做,才能够没有这个警告⚠️,或者说,这个warning无伤大雅,可以直接忽略。

    • 还有一个问题,我按照操作一步一步来,
      输入代码:dev_appserver.py ./app.yaml ./module-worker.yaml
      之后进入网址:http://localhost:8080/
      居然显示:该网页无法正常运作localhost ,目前无法处理此请求,HTTP ERROR 500。
      去查了一下:500 Internal Server Error 是表示服务器端错误的响应状态码,意味着所请求的服务器遇到意外的情况并阻止其执行请求。
      有甚多不明白之处,还望包含。

      • 只通过 HTTP 的 500 错误无法排查问题出在哪里,你需要看终端上给出的具体错误提示(一般是 Python 的 Traceback 错误提示)。

    • 这个提示说明的是 SDK 要求最低 Python 版本为 2.7.12,而系统自带 Python 版本有点低。如果一切运行正常可以忽略这个提示,不过对于 macOS 系统还是建议按照文中的提示,安装一个 Homebrew,安装独立的 Python 环境。

  9. 上传完打开 http://APPID.appspot.com 显示
    Error: Server Error
    The server encountered an error and could not complete your request.
    Please try again in 30 seconds.
    错误报告显示
    UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xc3 in position 5:
    请问如何解决啊?

    • 本文内容没有涉及 KindleEar 的上传。你对源码做了什么修改?从代码错误看是字符串编码问题。

      • 我是根据这里操作的【为了之后上传方便,建议去 GitHub 注册一个账户,然后把 KindleEar 项目 Fork 一份到自己的账户下,这样,在添加好编写的订阅脚本后,可以先将源代码 Push 到你 Fork 的项目中,再按照 KindleEar 搭建教程中的“自动上传”方式利用 Google App Engine 的云端 Shell 重新部署你 Fork 的 KindleEar 项目。】
        我加了一个自定义书籍,里面有í符号。
        后来我上传源码
        [rm -f uploader.sh* && \
        wget https://raw.githubusercontent.com/kindlefere/KindleEar-Uploader/master/uploader.sh && \
        chmod +x uploader.sh && \
        ./uploader.sh],也出现这样的错误。

            • 我直接把你 Github 下的 KindleEar 项目上传到 GAE,可以正常访问,并没有出现你留言中说的编码错误。在订阅列表中也能看到《El País》。也就是说 ELPAIS.py 这个脚本没有编码问题。

              对于自己修改的项目,建议还是用命令上传,不要用那个 Shell 脚本。上传命令也很简单,在云端 Shell 中把你 KindleEar 上的项目 Clone 下来(如果已 Clone 就用 Pull 命令更新),然后用 cd 命令定位到 KindleEar 项目目录用 appcfg.py 命令上传即可:

              git clone https://github.com/kimfyy/KindleEar.git
              cd KindleEar
              appcfg.py update app.yaml module-worker.yaml

              如果上传后还是出现错误,建议去 GAE 的日志中看一下错误的原因是什么。

              另外,我看 ELPAIS.py 这个脚本中的 URL 都是 RSS 地址,为什么不直接用 KindleEar 的“自定义 RSS”功能呢?

              • 【我直接把你 Github 下的 KindleEar 项目上传到 GAE,可以正常访问】请问要怎么上传?我根据原有书籍再次修改了ELPAIS.py文件,但更新之后已部署的文件并没有变化,ELPAIS.py还是原来错误的格式。可能是我的上传的方式不对,没有更新成功。我输入./uploader.sh,显示

                [已存在 KindleEar 源码,是否更新?[y/N]y
                Updating 293e820..659258d
                error: Your local changes to the following files would be overwritten by merge:
                        books/ELPAIS.py
                Please commit your changes or stash them before you merge.
                Aborting]没有更新

                【在云端 Shell 中用 cd 命令定位到 KindleEar 项目目录】这个 KindleEar 项目目录该在哪里找?请问该怎么操作啊?

                是这个错误报告吗?我看不懂……😂

                [Traceback (most recent call last):
                  File "/base/alloc/tmpfs/dynamic_runtimes/python27g/43d5822312de17fd/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 240, in Handle
                    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
                  File "/base/alloc/tmpfs/dynamic_runtimes/python27g/43d5822312de17fd/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 311, in _LoadHandler
                    handler, path, err = LoadObject(self._handler)
                  File "/base/alloc/tmpfs/dynamic_runtimes/python27g/43d5822312de17fd/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 96, in LoadObject
                    __import__(cumulative_path)
                  File "/base/data/home/apps/s~chachareads/1.418224781598922311/apps/module_front.py", line 59, in 
                    b = Book.all().filter("title = ", book.title).get()
                  File "/base/alloc/tmpfs/dynamic_runtimes/python27g/43d5822312de17fd/python27/python27_lib/versions/1/google/appengine/ext/db/__init__.py", line 2116, in get
                    results = self.run(limit=1, **kwargs)
                  File "/base/alloc/tmpfs/dynamic_runtimes/python27g/43d5822312de17fd/python27/python27_lib/versions/1/google/appengine/ext/db/__init__.py", line 2080, in run
                    iterator = raw_query.Run(**kwargs)
                  File "/base/alloc/tmpfs/dynamic_runtimes/python27g/43d5822312de17fd/python27/python27_lib/versions/1/google/appengine/api/datastore.py", line 1698, in Run
                    itr = Iterator(self.GetBatcher(config=config))
                  File "/base/alloc/tmpfs/dynamic_runtimes/python27g/43d5822312de17fd/python27/python27_lib/versions/1/google/appengine/api/datastore.py", line 1677, in GetBatcher
                    return self.GetQuery().run(_GetConnection(), query_options)
                  File "/base/alloc/tmpfs/dynamic_runtimes/python27g/43d5822312de17fd/python27/python27_lib/versions/1/google/appengine/api/datastore.py", line 1549, in GetQuery
                    filter_predicate=self.GetFilterPredicate(),
                  File "/base/alloc/tmpfs/dynamic_runtimes/python27g/43d5822312de17fd/python27/python27_lib/versions/1/google/appengine/api/datastore.py", line 1594, in GetFilterPredicate
                    property_filters.append(datastore_query.make_filter(name, op, values))
                  File "/base/alloc/tmpfs/dynamic_runtimes/python27g/43d5822312de17fd/python27/python27_lib/versions/1/google/appengine/datastore/datastore_query.py", line 114, in make_filter
                    properties = datastore_types.ToPropertyPb(name, values)
                  File "/base/alloc/tmpfs/dynamic_runtimes/python27g/43d5822312de17fd/python27/python27_lib/versions/1/google/appengine/api/datastore_types.py", line 1800, in ToPropertyPb
                    pbvalue = pack_prop(name, v, pb.mutable_value())
                  File "/base/alloc/tmpfs/dynamic_runtimes/python27g/43d5822312de17fd/python27/python27_lib/versions/1/google/appengine/api/datastore_types.py", line 1599, in PackString
                    pbvalue.set_stringvalue(six_subset.text_type(value).encode('utf-8'))
                UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 5: ordinal not in range(128)]

                我想把这个西语报纸的rss集中在一个文件里,这样方便查词典以及整理标注,在自定义订阅里可以订阅零散的英语rss。

                • 没变化就表示上传没成功。上传 KindleEar 简单说就两步,先获取到源码,再用 appcfg.py 命令上传到 GAE。

                  不过你得清楚你上传的思路是什么。是想要在本地直接把源码上传到 GAE(具体步骤参考《KindleEar 搭建教程》的手动上传部分),还是想要从云端 Shell 要把 Push 到 GitHub 的代码 Pull 下来上传到 GAE。因为本地上传步骤比较繁琐,所以才推荐利用云端 Shell 从 Github 拉取源代码上传。

                  KindleEar 的设置中有“多本书籍合并投递为一本”这个选项的,勾选并保存之后,所有自定义 RSS 都会合并成一本书推送。

  10. 您好,3.1节安装安装 App Engine SDK时,您只是提到下载安装 App Engine SDK包完成安装,但是我下载以后并没有发现有exe或者是bat文件,请问要怎么安装?

          • 您好,我把所有项目完成以后,运行命令也出现了”info……PID”等一连串代码,但是在浏览器始终打不开http://localhost:8080 地址,提示为“localhost 拒绝了我们的连接请求”,具体截图已经发您邮箱,请您帮助,谢谢

            • 你提供的截图显示,comic 中的 yuna.py 想要从 tencentbase.py 中导入 TencentBaseBook 这个类,却找不到 tencentbase 这个模块。但是我看了一下代码,KindleEar 自带的 yuna.py 并没有导入 TencentBaseBook 这个类。

              你对代码做改动了吗?如果改动了代码最好说一下都改了什么。

              • 谢谢您!已经搞定。
                我fork源码以后把book文件夹中不需要的订阅脚本删除了,可能是误删导致了上面的问题。我直接用您提供的源码以后,目前已经成功登陆

                • 删除不需要的订阅脚本需要注意清理相关的一些模块依赖。比如想要删除 comic 下 cartoonmadbase.py 模块,就要在 __init__.py 文件中移除对该模块的导入,同时还要把所有依赖此模块的其它 py 模块也删除。

      • 不知道有什么办法能实现自动抓取并推送存在网站上的*_001.mobi, *_002.mobi顺序文件?

        • 如果下载链接有规律,可以直接用下载软件的批量下载功能实现。比如迅雷就支持批量任务,假设想要下载网站 http://example.com 上的 _001.mobi 到 _100.mobi 这 100 个文件,可以在新建的批量任务中设定含通配符的 URL:http://exsample.com/_(*).mobi,然后将把通配符匹配长度设为 3,就可以批量下载这些文件了。

  11. 什么年代了,还装py2,不知道py2马上就要停止支持了嘛?而且py2编码暗坑无数,我不信你没被编码搞到脑袋爆炸过。

    • 选择 Python2 主要是因为 KindleEar 依赖的 Calibre 处理模块不支持 Python3。这个问题在 KindleEar 的 Issue 中有讨论:考虑兼容python3?

      不过 Calibre 在 3.41.3 版本的更新日志中表示,正在对代码库做了大量更改,以便为支持 Python3 做好准备。如果到时候 KindleEar 替换成支持 Python3 的 Calibre 模块,就可以用 Python3 环境了。或者你自己更改目前的 Calibre 模块源代码使其支持 Python3 也可以。