Newspaper3k syntax error or wrong python version?

让人想犯罪 __ 提交于 2019-12-13 03:35:02

问题


I'm trying to use newspaper3k and I followed all the steps to install. Everything works locally. When I push to my Azure App Service, I receive the following error below. My python version on Azure is 3.6.4.4. Any suggestions?

Traceback (most recent call last):
  File "D:\home\python364x64\wfastcgi.py", line 791, in main
    env, handler = read_wsgi_handler(response.physical_path)
  File "D:\home\python364x64\wfastcgi.py", line 633, in read_wsgi_handler
    handler = get_wsgi_handler(os.getenv("WSGI_HANDLER"))
  File "D:\home\python364x64\wfastcgi.py", line 600, in get_wsgi_handler
    handler = __import__(module_name, fromlist=[name_list[0][0]])
  File ".\app.py", line 8, in <module>
    from newspaper import Article
  File "D:\home\python364x64\lib\site-packages\newspaper\__init__.py", line 10, in <module>
    from .api import (build, build_article, fulltext, hot, languages,
  File "D:\home\python364x64\lib\site-packages\newspaper\api.py", line 12, in <module>
    import feedparser
  File "D:\home\python364x64\lib\site-packages\feedparser.py", line 316
    raise KeyError, "object doesn't have key 'category'"
                  ^
SyntaxError: invalid syntax


StdOut: 

StdEr

Update I

feedparser==5.2.1

来源:https://stackoverflow.com/questions/51197607/newspaper3k-syntax-error-or-wrong-python-version

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!