hack4impact / flask-base

A simple Flask boilerplate app with SQLAlchemy, Redis, User Authentication, and more.
http://hack4impact.github.io/flask-base
MIT License
3.04k stars 481 forks source link

SyntaxError: invalid syntax while running Flask in venv #211

Closed rpalri closed 3 years ago

rpalri commented 4 years ago

Why could this be happening? Please help!

Traceback (most recent call last):
  File "/opt/anaconda3/bin/flask", line 10, in <module>
    sys.exit(main())
  File "/opt/anaconda3/lib/python3.7/site-packages/flask/cli.py", line 967, in main
    cli.main(args=sys.argv[1:], prog_name="python -m flask" if as_module else None)
  File "/opt/anaconda3/lib/python3.7/site-packages/flask/cli.py", line 586, in main
    return super(FlaskGroup, self).main(*args, **kwargs)
  File "/opt/anaconda3/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/opt/anaconda3/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/anaconda3/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/anaconda3/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/opt/anaconda3/lib/python3.7/site-packages/click/decorators.py", line 73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/opt/anaconda3/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/opt/anaconda3/lib/python3.7/site-packages/flask/cli.py", line 848, in run_command
    app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
  File "/opt/anaconda3/lib/python3.7/site-packages/flask/cli.py", line 305, in __init__
    self._load_unlocked()
  File "/opt/anaconda3/lib/python3.7/site-packages/flask/cli.py", line 330, in _load_unlocked
    self._app = rv = self.loader()
  File "/opt/anaconda3/lib/python3.7/site-packages/flask/cli.py", line 392, in load_app
    app = locate_app(self, import_name, None, raise_if_not_found=False)
  File "/opt/anaconda3/lib/python3.7/site-packages/flask/cli.py", line 240, in locate_app
    __import__(module_name)
  File "/Users/raghav/Downloads/CS_Training/PS/plumber_app/app/app.py", line 1, in <module>
    import pandas as pd
  File "/opt/anaconda3/lib/python3.7/site-packages/pandas/__init__.py", line 30, in <module>
    from pandas._libs import hashtable as _hashtable, lib as _lib, tslib as _tslib
  File "/opt/anaconda3/lib/python3.7/site-packages/pandas/_libs/__init__.py", line 13, in <module>
    from pandas._libs.interval import Interval
  File "pandas/_libs/interval.pyx", line 1, in init pandas._libs.interval
  File "pandas/_libs/hashtable.pyx", line 1, in init pandas._libs.hashtable
  File "pandas/_libs/missing.pyx", line 1, in init pandas._libs.missing
  File "/opt/anaconda3/lib/python3.7/site-packages/pandas/_libs/tslibs/__init__.py", line 30, in <module>
    from .conversion import OutOfBoundsTimedelta, localize_pydatetime
  File "pandas/_libs/tslibs/conversion.pyx", line 1, in init pandas._libs.tslibs.conversion
  File "pandas/_libs/tslibs/timezones.pyx", line 7, in init pandas._libs.tslibs.timezones
  File "/opt/anaconda3/lib/python3.7/site-packages/dateutil/tz.py", line 78
    `self._name`,
abhisuri97 commented 4 years ago

Hi there, are you sure that this error message is from our library? there are some packages listed here that don't seem to be relevant to flask-base. If it is from this library, can you comment on what are the steps you took to actually get these errors?

rpalri commented 3 years ago

I am simply trying to run the app using the command flask run and then getting this error.

rpalri commented 3 years ago

I tried it without using the virtual environment and am still getting the same error.

abhisuri97 commented 3 years ago

Hmm. so could you try and run the application using the instructions in the README for this repository? (i.e. the "honcho" command). You'll also need to install the dependencies (ref the README instructions) in a virtual environment & activate that environment before you run the honcho command.

rpalri commented 3 years ago

I'm pretty new at this. Let me try out what you said and then get back.

abhisuri97 commented 3 years ago

Closing (feel free to re-open if you need any more help!)