mcdallas / wallstreet

Real time stock and option data.
MIT License
1.38k stars 203 forks source link

import error #1

Closed charleshsu314 closed 8 years ago

charleshsu314 commented 8 years ago

After a successful pip install, when importing into python it immediately hits this error, the wedge points at "from" in the "from None".

Charles-Hsu-MacBook-Pro:~ Charles$ python Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 26 2016, 12:10:39) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information.

import wallstreet Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wallstreet/init.py", line 1, in from wallstreet.wallstreet import Stock, Call, Put File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wallstreet/wallstreet.py", line 125 raise ValueError('Possible expiration dates for this stock are:', self.expirations) from None ^ SyntaxError: invalid syntax

mcdallas commented 8 years ago

That is because the from None syntax was added in Python 3. The whole library was made with Python 3 in mind and I haven't really tested it on Python 2.