{"action":"closed","issue":{"url":"https://api.github.com/repos/PythonCharmers/python-future/issues/231","repository_url":"https://api.github.com/repos/PythonCharmers/python-future","labels_url":"https://api.github.com/repos/PythonCharmers/python-future/issues/231/labels{/name}","comments_url":"https://api.github.com/repos/PythonCharmers/python-future/issues/231/comments","events_url":"https://api.github.com/repos/PythonCharmers/python-future/issues/231/events","html_url":"https://github.com/PythonCharmers/python-future/issues/231","id":173514097,"number":231,"title":"ImportError when using CommonMark-py with Google App Engine","user":{"login":"badersur","id":1686391,"avatar_url":"https://avatars.githubusercontent.com/u/1686391?v=3","gravatar_id":"","url":"https://api.github.com/users/badersur","html_url":"https://github.com/badersur","followers_url":"https://api.github.com/users/badersur/followers","following_url":"https://api.github.com/users/badersur/following{/other_user}","gists_url":"https://api.github.com/users/badersur/gists{/gist_id}","starred_url":"https://api.github.com/users/badersur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/badersur/subscriptions","organizations_url":"https://api.github.com/users/badersur/orgs","repos_url":"https://api.github.com/users/badersur/repos","events_url":"https://api.github.com/users/badersur/events{/privacy}","received_events_url":"https://api.github.com/users/badersur/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-08-26T18:25:39Z","updated_at":"2016-10-27T20:17:45Z","closed_at":"2016-10-27T20:17:44Z","body":"When I try to use [CommonMark-py][0] -which uses python-future- with App Engine I get this error, if I put `import CommonMark` at the top:\r\n\r\n```\r\nERROR    2016-08-26 14:04:59,126 wsgi.py:263] \r\nTraceback (most recent call last):\r\n  File \"/home/super/google_appengine/google/appengine/runtime/wsgi.py\", line 240, in Handle\r\n    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())\r\n  File \"/home/super/google_appengine/google/appengine/runtime/wsgi.py\", line 299, in _LoadHandler\r\n    handler, path, err = LoadObject(self._handler)\r\n  File \"/home/super/google_appengine/google/appengine/runtime/wsgi.py\", line 85, in LoadObject\r\n    obj = __import__(path[0])\r\n  File \"/home/super/WebProjects/myapp/blog.py\", line 3, in <module>\r\n    from models import Post\r\n  File \"/home/super/WebProjects/myapp/models.py\", line 1, in <module>\r\n    import CommonMark\r\n  File \"/home/super/WebProjects/myapp/libs/CommonMark/__init__.py\", line 4, in <module>\r\n    from CommonMark.main import commonmark\r\n  File \"/home/super/WebProjects/myapp/libs/CommonMark/main.py\", line 15, in <module>\r\n    from CommonMark.dump import dumpAST, dumpJSON\r\n  File \"/home/super/WebProjects/myapp/libs/CommonMark/dump.py\", line 3, in <module>\r\n    from builtins import str\r\n  File \"/home/super/WebProjects/myapp/libs/builtins/__init__.py\", line 8, in <module>\r\n    from future.builtins import *\r\n  File \"/home/super/WebProjects/myapp/libs/future/builtins/__init__.py\", line 10, in <module>\r\n    from future.builtins.iterators import (filter, map, zip)\r\n  File \"/home/super/WebProjects/myapp/libs/future/builtins/iterators.py\", line 43, in <module>\r\n    from future.types import newrange as range\r\n  File \"/home/super/WebProjects/myapp/libs/future/types/__init__.py\", line 243, in <module>\r\n    from .newrange import newrange\r\n  File \"/home/super/WebProjects/myapp/libs/future/types/newrange.py\", line 25, in <module>\r\n    from future.backports.misc import count   # with step parameter on Py2.6\r\n  File \"/home/super/WebProjects/myapp/libs/future/backports/__init__.py\", line 17, in <module>\r\n    from .misc import (ceil,\r\n  File \"/home/super/WebProjects/myapp/libs/future/backports/misc.py\", line 900, in <module>\r\n    from subprocess import check_output\r\nImportError: cannot import name check_output\r\nINFO     2016-08-26 14:04:59,140 module.py:788] default: \"GET /blog/5822463824887808 HTTP/1.1\" 500 -\r\nINFO     2016-08-26 14:04:59,196 module.py:788] default: \"GET /favicon.ico HTTP/1.1\" 304 -\r\n```\r\n\r\nBut, when I `import CommonMark` inside a method I get:\r\n\r\n```\r\nERROR    2016-08-26 13:38:08,116 webapp2.py:1552] cannot import name check_output\r\nTraceback (most recent call last):\r\n  File \"/home/super/google_appengine/lib/webapp2-2.5.2/webapp2.py\", line 1535, in __call__\r\n    rv = self.handle_exception(request, response, e)\r\n  File \"/home/super/google_appengine/lib/webapp2-2.5.2/webapp2.py\", line 1529, in __call__\r\n    rv = self.router.dispatch(request, response)\r\n  File \"/home/super/google_appengine/lib/webapp2-2.5.2/webapp2.py\", line 1278, in default_dispatcher\r\n    return route.handler_adapter(request, response)\r\n  File \"/home/super/google_appengine/lib/webapp2-2.5.2/webapp2.py\", line 1102, in __call__\r\n    return handler.dispatch()\r\n  File \"/home/super/google_appengine/lib/webapp2-2.5.2/webapp2.py\", line 572, in dispatch\r\n    return self.handle_exception(e, self.app.debug)\r\n  File \"/home/super/google_appengine/lib/webapp2-2.5.2/webapp2.py\", line 570, in dispatch\r\n    return method(*args, **kwargs)\r\n  File \"/home/super/WebProjects/myapp/blog.py\", line 29, in get\r\n    self.render('permalink.html', post=post, url=self.url)\r\n  File \"/home/super/WebProjects/myapp/handlers.py\", line 33, in render\r\n    self.write(self.render_str(template, **kw))\r\n  File \"/home/super/WebProjects/myapp/handlers.py\", line 30, in render_str\r\n    return render_str(template, **kw)\r\n  File \"/home/super/WebProjects/myapp/handlers.py\", line 20, in render_str\r\n    return t.render(kw)\r\n  File \"/home/super/google_appengine/lib/jinja2-2.6/jinja2/environment.py\", line 894, in render\r\n    return self.environment.handle_exception(exc_info, True)\r\n  File \"/home/super/WebProjects/myapp/templates/permalink.html\", line 1, in top-level template code\r\n    {% extends \"base.html\" %}\r\nImportError: cannot import name check_output\r\nINFO     2016-08-26 13:38:08,186 module.py:788] default: \"GET /blog/5822463824887808 HTTP/1.1\" 500 228\r\nINFO     2016-08-26 13:38:08,281 module.py:788] default: \"GET /favicon.ico HTTP/1.1\" 304 -\r\n``` \r\n\r\nI am used to add other libraries to my App Engine projects as described in App Engine's [installing a library][1] document but this library causes these errors even though it is working with webapp2 outside App Engine!\r\n\r\nI reported this issue to [CommonMark][2] but Mr. @nikolas suggested reporting it here.\r\n\r\n**Note:** I am using [App Engine Standard Environment][3] and Python 2.7.12. Also, It seems like App Engine is using [version 2.7.2][4].\r\n\r\n[0]: https://github.com/rtfd/CommonMark-py\r\n[1]: https://cloud.google.com/appengine/docs/python/tools/using-libraries-python-27#installing_a_library \r\n[2]: https://github.com/rtfd/CommonMark-py/issues/82\r\n[3]: https://cloud.google.com/appengine/docs/python/quickstart\r\n[4]: https://cloud.google.com/appengine/docs/python/runtime#Python_Pure_Python\r\n"}}
{"actor":{"display_login":"edschofield"}}