defaultnamehere / tinder-detective

Find your Facebook friends' Tinder profiles. Don't actually use this by the way that's weird. Not even in a good way.
MIT License
703 stars 60 forks source link

ImportError: cannot import name 'Flask' #30

Closed rpdelaney closed 8 years ago

rpdelaney commented 8 years ago

In archlinux.

$ python3 --version
Python 3.5.2
$ sudo pip install -r requirements.txt
Requirement already satisfied (use --upgrade to upgrade): click==6.6 in /usr/lib/python3.5/site-packages (from -r requirements.txt (line 1))
Requirement already satisfied (use --upgrade to upgrade): Flask==0.11.1 in /usr/lib/python3.5/site-packages (from -r requirements.txt (line 2))
Requirement already satisfied (use --upgrade to upgrade): itsdangerous==0.24 in /usr/lib/python3.5/site-packages (from -r requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): Jinja2==2.8 in /usr/lib/python3.5/site-packages (from -r requirements.txt (line 4))
Requirement already satisfied (use --upgrade to upgrade): MarkupSafe==0.23 in /usr/lib/python3.5/site-packages (from -r requirements.txt (line 5))
Requirement already satisfied (use --upgrade to upgrade): python-dateutil==2.5.3 in /usr/lib/python3.5/site-packages (from -r requirements.txt (line 6))
Requirement already satisfied (use --upgrade to upgrade): requests==2.10.0 in /usr/lib/python3.5/site-packages (from -r requirements.txt (line 7))
Requirement already satisfied (use --upgrade to upgrade): six==1.10.0 in /usr/lib/python3.5/site-packages (from -r requirements.txt (line 8))
Requirement already satisfied (use --upgrade to upgrade): Werkzeug==0.11.10 in /usr/lib/python3.5/site-packages (from -r requirements.txt (line 9))
$ python3 app.py
Traceback (most recent call last):
  File "app.py", line 3, in <module>
    from flask import Flask, render_template
ImportError: cannot import name 'Flask'
$
rpendleton commented 8 years ago

Have you tried running it in a virtualenv?

virtualenv -p python3 .
source bin/activate
pip install -r requirements.txt
python app.py
rpendleton commented 8 years ago

(And that's assuming you already followed #21)

rpdelaney commented 8 years ago

Hmm. Now it's this:

(tinder-detective) $ python3 app.py
Traceback (most recent call last):
  File "app.py", line 9, in <module>
    stalker = api.NSASimulator()
  File "/tmp/tinder-detective/api.py", line 42, in __init__
    self._load_fb_auth()
  File "/tmp/tinder-detective/api.py", line 51, in _load_fb_auth
    self.fb_auth = json.load(f)
  File "/usr/lib64/python3.5/json/__init__.py", line 268, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/usr/lib64/python3.5/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python3.5/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python3.5/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)```
rpendleton commented 8 years ago

Is your SECRETS.json file valid? I'd bet you're missing a , (or have an extra one).

rpdelaney commented 8 years ago

Yup, there was an error. That did it. Thanks.