python - Using yahoo_finance api in PySide Simple Application -


i'm trying system tray indicator price of different companies. i'm using pyside ui , yahoo_finance package data.

this code shows prices of 2 different companies:

import yahoo_finance labels = ['san', 'ixd1.sg'] x in labels:     o = yahoo_finance.share(x)     print(o.get_price()) 

but, after call qapplication method, error:

from pyside import qtgui, qtcore import yahoo_finance app = qtgui.qapplication([]) labels = ['san', 'ixd1.sg'] x in labels:     o = yahoo_finance.share(x)     print(o.get_price())   file "/usr/local/lib/python3.4/dist-packages/yahoo_finance/__init__.py", line 23, in edt_to_utc date_ = datetime.strptime(date.replace(" 0:", " 12:"), mask) file "/usr/lib/python3.4/_strptime.py", line 500, in _strptime_datetime tt, fraction = _strptime(data_string, format) file "/usr/lib/python3.4/_strptime.py", line 340, in _strptime data_string[found.end():]) valueerror: unconverted data remains: pm 

i've searching why happened couldn't find solution.

  • i check locale settings before , after call qapplication, ok.

thanks!


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

python - How to remove the Xframe Options header in django? -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -