Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.6 SyntaxError attempting to import Flask #691

Open
kevinburkefreenome opened this issue Aug 6, 2018 · 0 comments
Open

Python 3.6 SyntaxError attempting to import Flask #691

kevinburkefreenome opened this issue Aug 6, 2018 · 0 comments

Comments

@kevinburkefreenome
Copy link

When I try to start the tests using Python 3.6, and other issues are resolved, I get the following stack trace.

running build_ext
Traceback (most recent call last):
  File "setup.py", line 110, in <module>
    zip_safe=False
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/opt/python/3.6.3/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/opt/python/3.6.3/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/opt/python/3.6.3/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/setuptools/command/test.py", line 226, in run
    self.run_tests()
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/setuptools/command/test.py", line 248, in run_tests
    exit=False,
  File "/opt/python/3.6.3/lib/python3.6/unittest/main.py", line 94, in __init__
    self.parseArgs(argv)
  File "/opt/python/3.6.3/lib/python3.6/unittest/main.py", line 141, in parseArgs
    self.createTests()
  File "/opt/python/3.6.3/lib/python3.6/unittest/main.py", line 148, in createTests
    self.module)
  File "/opt/python/3.6.3/lib/python3.6/unittest/loader.py", line 219, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/opt/python/3.6.3/lib/python3.6/unittest/loader.py", line 219, in <listcomp>
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/opt/python/3.6.3/lib/python3.6/unittest/loader.py", line 190, in loadTestsFromName
    return self.loadTestsFromModule(obj)
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/setuptools/command/test.py", line 52, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/opt/python/3.6.3/lib/python3.6/unittest/loader.py", line 153, in loadTestsFromName
    module = __import__(module_name)
  File "/home/travis/build/kevinburkefreenome/flask-restless/tests/helpers.py", line 24, in <module>
    from flask import Flask
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/Flask-0.12.4-py3.6.egg/flask/__init__.py", line 21, in <module>
    from .app import Flask, Request, Response
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/Flask-0.12.4-py3.6.egg/flask/app.py", line 1502
            """
SyntaxError: invalid escape sequence \s

I had to lock the Flask version to version 0.12, otherwise we run into the issue present in #686. It's possible that this version of Flask is simply incompatible with version 3.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant