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

Python Datetime Timezone Issue #13

Closed sibblegp closed 8 years ago

sibblegp commented 8 years ago

python app.py
Traceback (most recent call last): File "app.py", line 5, in import api File "/apps/tinder-detective/api.py", line 7, in from datetime import timezone ImportError: cannot import name timezone

I don't think Python 2.7 has timezone but 3.X won't run Flask. What am I missing here?

sibblegp commented 8 years ago

When I try to run under 3.X:

Traceback (most recent call last): File "app.py", line 7, in app = Flask('tinder-detective') File "/apps/tinder-detective/env_tinder_detective/lib/python3.4/site-packages/flask/app.py", line 346, in init root_path=root_path) File "/apps/tinder-detective/env_tinder_detective/lib/python3.4/site-packages/flask/helpers.py", line 807, in init root_path = get_root_path(self.import_name) File "/apps/tinder-detective/env_tinder_detective/lib/python3.4/site-packages/flask/helpers.py", line 657, in get_root_path loader = pkgutil.get_loader(import_name) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/pkgutil.py", line 469, in get_loader return find_loader(fullname) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/pkgutil.py", line 490, in find_loader return spec.loader AttributeError: 'NoneType' object has no attribute 'loader'

matarrese commented 8 years ago

Having some error: Mac OSX

raed667 commented 8 years ago

Same error Windows 8.1

Beertie commented 8 years ago

Set from datetime import timezone TO from datetime import datetime

rafael-azevedo commented 8 years ago

on OSX run pip3 install datetime

gregorylivschitz commented 8 years ago

Concerning the NoneType loader issue. This is happening because you are running python3.40, there seems to be a bug with that version and flask. I ran into this problem.

If you change the python version to 3.43+ it should work. Here is the github thread for reference: https://github.com/pallets/flask/issues/1011

sibblegp commented 8 years ago

Set from datetime import timezone TO from datetime import datetime

This worked. Thanks!