madsailor / SMF-Extension

LibreOffice extension for retrieving stock market data
GNU Lesser General Public License v3.0
27 stars 17 forks source link

"Request Denied" message for Yahoo quote #24

Open Jacopoog opened 6 years ago

Jacopoog commented 6 years ago

Up to today, the Yahoo formula give back a "Request denied" message as cell value/result. Since Yahoo as granting "realtime" data (delay is 20mins), Yahoo financial data are much more useful than Morningstar ones (updated until the closing of the day before) Any suggestions? Thanks J

TheMac2017 commented 6 years ago

it needs an update. for the time being remove the extention and restart

it will leave the formulas but remove the python coding and start working again, albeit with complicated formulas.

also keep an eye on the dhocker fork, as he actually updates it. madsailor hasnt updated since 2015.

obriendavid commented 6 years ago

I have the same "request denied" problem. Tried uninstalling / restarting, reinstalling / restarting. Tried Forked version - all to now avail... Have been using this for some time and found it very useful. Grateful for any tips that either get it working again or if there is some alternative extension with similar functionality...

TheMac2017 commented 6 years ago

you have to remove it and leave it removed.

one you restart they will calc, but have crazy URL formulas.

TheMac2017 commented 6 years ago

did some more search. my workaround wont work, it only shows the last data in the sql table.

the function relies on the yahoo finance api (finance.yahoo.com/d/ page and csv table download) functionlity.

Yahoo/verizon has taken it offline.

unless they put it back on-line, this function is dead in the water.

the forbidden page returns this message: "It has come to our attention that this service is being used in violation of the Yahoo Terms of Service. As such, the service is being discontinued. For all future markets and equities data research, please refer to finance.yahoo.com."

Jacopoog commented 6 years ago

Hi all, thanks @TheMac2017 for the DHocker Fork suggestion. I am quite sure that the Yahoo issue can be resolved using Google or Intrinio... As requested by @dhocker, (before, I uninstalled Python27, then) I installed Python3 and created a PYTHONPATH ambient variable, but LibreOffice give me back a huge amount of errors... I can't understand 100% where's the issue. Must I uninstall then reinstall a clean LibreOffice pack? Thanks in advance... I made a screenshot here: odt

dhocker commented 6 years ago

This sort of error usually occurs when the version of Python you "side installed" does not match the version of Python that ships (is embedded) in LibreOffice (LO). Right now I am using LO 5.4.1.2 and it requires Python 3.5.

The problem is that LO ships differently on different platforms. My SMF extension fork uses an Sqlite DB for caching of quotes. Sqlite is not part of the LO distro on Windows, but it is part of the macOS distro.

My PYTHONPATH variable looks like this:

PYTHONPATH=c:\Python35;c:\Python35\Lib;c:\Python35\Lib\site-packages;c:\Python35\Lib\sqlite3;c:\python35\DLLs;

I have Python 3.5.0 installed at c:\Python35.

What version of LO are you using? You can check the LO embedded version of Python by running the Python executable at "C:\Program Files (x86)\LibreOffice 5\program\python". My install says it is Python 3.5.4.

"C:\Program Files (x86)\LibreOffice 5\program\python" Python 3.5.4 (default, Aug 26 2017, 08:22:04) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.

exit()

I'd suggest that you remove any existing SMF extension. Then make sure you have the right version of Python 3 installed. Then try installing the SMF extension.

On Fri, Nov 3, 2017 at 5:23 AM, jacopoog notifications@github.com wrote:

Hi all, thanks @TheMac2017 https://github.com/themac2017 for the DHocker Fork suggestion. I am quite sure that the Yahoo issue can be resolved using Google or Intrinio... As requested by @dhocker https://github.com/dhocker, (before, I uninstalled Python27, then) I installed Python3 and created a PYTHONPATH ambient variable, but LibreOffice give me back a huge amount of errors... I can't understand 100% where's the issue. Must I uninstall then reinstall a clean LibreOffice pack? Thanks in advance... I made a screenshot here: [image: odt] https://user-images.githubusercontent.com/27346218/32369400-55ad273e-c089-11e7-9eb1-43fe724d1bb4.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/madsailor/SMF-Extension/issues/24#issuecomment-341666035, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpZ7mSU9CI5lMpC0c8yIZ_pNnRv1_dvks5syumngaJpZM4QP5gP .

-- [dh]

dhocker commented 6 years ago

I forgot to mention that I have an Intrinio LO extension, too. You can find it at https://github.com/qalydon/intrinio-localc

On Fri, Nov 3, 2017 at 10:01 AM, Dave Hocker dghocker@gmail.com wrote:

This sort of error usually occurs when the version of Python you "side installed" does not match the version of Python that ships (is embedded) in LibreOffice (LO). Right now I am using LO 5.4.1.2 and it requires Python 3.5.

The problem is that LO ships differently on different platforms. My SMF extension fork uses an Sqlite DB for caching of quotes. Sqlite is not part of the LO distro on Windows, but it is part of the macOS distro.

My PYTHONPATH variable looks like this:

PYTHONPATH=c:\Python35;c:\Python35\Lib;c:\Python35\Lib\ site-packages;c:\Python35\Lib\sqlite3;c:\python35\DLLs;

I have Python 3.5.0 installed at c:\Python35.

What version of LO are you using? You can check the LO embedded version of Python by running the Python executable at "C:\Program Files (x86)\LibreOffice 5\program\python". My install says it is Python 3.5.4.

"C:\Program Files (x86)\LibreOffice 5\program\python" Python 3.5.4 (default, Aug 26 2017, 08:22:04) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.

exit()

I'd suggest that you remove any existing SMF extension. Then make sure you have the right version of Python 3 installed. Then try installing the SMF extension.

On Fri, Nov 3, 2017 at 5:23 AM, jacopoog notifications@github.com wrote:

Hi all, thanks @TheMac2017 https://github.com/themac2017 for the DHocker Fork suggestion. I am quite sure that the Yahoo issue can be resolved using Google or Intrinio... As requested by @dhocker https://github.com/dhocker, (before, I uninstalled Python27, then) I installed Python3 and created a PYTHONPATH ambient variable, but LibreOffice give me back a huge amount of errors... I can't understand 100% where's the issue. Must I uninstall then reinstall a clean LibreOffice pack? Thanks in advance... I made a screenshot here: [image: odt] https://user-images.githubusercontent.com/27346218/32369400-55ad273e-c089-11e7-9eb1-43fe724d1bb4.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/madsailor/SMF-Extension/issues/24#issuecomment-341666035, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpZ7mSU9CI5lMpC0c8yIZ_pNnRv1_dvks5syumngaJpZM4QP5gP .

-- [dh]

-- [dh]

TheMac2017 commented 6 years ago

i seem to have solved the python sql issue, but i get this message that seems to no be able to access one of the py files in the uno user directory:

image

Jacopoog commented 6 years ago

Hi @dhocker, I verified: i had LO 5.3. So, I uninstalled it, rebooted, and installed a fresh new LO 5.4.2. Into the LO\Program directory, python version installed is 3.5.4. I still have C:\Python3 installation with Python 3.6 into and PYTHONPAT setted as "c:\python3;c:\python3\Lib;c:\python3\Lib\site-packages;c:\python3\Lib\sqlite3;c:\python3\DLLs;"

THEN I launched Calc then reinstalled SMF.OXT, but the error message is still the same of the above IMG...

I still have a LO %APPDATA% directory called 4 (4? not 5?) \Roaming\LibreOffice\4\user... What can I try again? a full registry clean after having uninstalled LO? Can the issue be in relationship with language? (I use IT) Thanks, so far...

odt

dhocker commented 6 years ago

I think you still have a Python version mismatch. You need to check the version of Python that is embedded in LO 5.4.2. I'm guessing it is 3.5.x. You have side installed Python 3.6 which probably will not match to the Python in LO 5.4.2.

Can you check the version of Python embedded in LO 5.4.2?

Or, you might try uninstalling Python 3.6 and installing Python 3.5.

I'm going to update LO to 5.4.2 on my Windows system to see what happens.

On Fri, Nov 3, 2017 at 11:00 AM, jacopoog notifications@github.com wrote:

Hi @dhocker https://github.com/dhocker, I verified: i had LO 5.3. So, I uninstalled it, rebooted, and installed a fresh new LO 5.4.2. Into the LO\Program directory, python version installed is 3.5.4. I still have C:\Python3 installation with Python 3.6 into and PYTHONPAT setted as "c:\python3;c:\python3\Lib;c:\python3\Lib\site-packages;c:\ python3\Lib\sqlite3;c:\python3\DLLs;"

THEN I launched Calc then reinstalled SMF.OXT, but the error message is still the same of the above IMG...

I still have a LO %APPDATA% directory called 4 (4? not 5?) \Roaming\LibreOffice\4\user... What can I try again? a full registry clean after having uninstalled LO? Can the issue be in relationship with language? (I use IT) Thanks, so far...

[image: odt] https://user-images.githubusercontent.com/27346218/32383525-7a75e928-c0b8-11e7-8f12-420e2e7557f2.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/madsailor/SMF-Extension/issues/24#issuecomment-341746907, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpZ7m_-NdvsF0nW97NM-CIn_arNUsbxks5syzilgaJpZM4QP5gP .

-- [dh]

dhocker commented 6 years ago

I just finished upgrading to LO 5.4.2.2. The embedded Python version is 3.5.4. My side installed version of Python is 3.5.0. This combination works as expected.

On Fri, Nov 3, 2017 at 11:22 AM, Dave Hocker dghocker@gmail.com wrote:

I think you still have a Python version mismatch. You need to check the version of Python that is embedded in LO 5.4.2. I'm guessing it is 3.5.x. You have side installed Python 3.6 which probably will not match to the Python in LO 5.4.2.

Can you check the version of Python embedded in LO 5.4.2?

Or, you might try uninstalling Python 3.6 and installing Python 3.5.

I'm going to update LO to 5.4.2 on my Windows system to see what happens.

On Fri, Nov 3, 2017 at 11:00 AM, jacopoog notifications@github.com wrote:

Hi @dhocker https://github.com/dhocker, I verified: i had LO 5.3. So, I uninstalled it, rebooted, and installed a fresh new LO 5.4.2. Into the LO\Program directory, python version installed is 3.5.4. I still have C:\Python3 installation with Python 3.6 into and PYTHONPAT setted as "c:\python3;c:\python3\Lib;c:\python3\Lib\site-packages;c:\p ython3\Lib\sqlite3;c:\python3\DLLs;"

THEN I launched Calc then reinstalled SMF.OXT, but the error message is still the same of the above IMG...

I still have a LO %APPDATA% directory called 4 (4? not 5?) \Roaming\LibreOffice\4\user... What can I try again? a full registry clean after having uninstalled LO? Can the issue be in relationship with language? (I use IT) Thanks, so far...

[image: odt] https://user-images.githubusercontent.com/27346218/32383525-7a75e928-c0b8-11e7-8f12-420e2e7557f2.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/madsailor/SMF-Extension/issues/24#issuecomment-341746907, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpZ7m_-NdvsF0nW97NM-CIn_arNUsbxks5syzilgaJpZM4QP5gP .

-- [dh]

-- [dh]

Jacopoog commented 6 years ago

Yhan you @dhocker, I unisntalled Py 3.6 then installe 3.5.4 and averything is OK (the Extension. not the Yahoo APIs, unfortunatelly). You're great. J

TheMac2017 commented 6 years ago

im using LO 5.4.2.2, and python 3.5.4, and im still getting that cant find file message i posted above (although im not getting a sql error)

Any thoughts?

intrino installed no problem. I typoed the un/password though, how you reset it? cant seem to find any docs on it

dhocker commented 6 years ago

The screenshot seems to indicate that LO was looking for a path ending in "SMF (1).oxt". On my system, the path ends with "SMF.oxt". This implies that there are multiple installs of the SMF extension. Check the extension manager and make sure there are no installs of SMF. You might also try going down that path and deleting the files. For example, on my system I have:

C:\Users\dhocker\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\unopackages\lu8400g4v52l.tmp\SMF.oxt

Under this folder are all the files in the extension. I would try deleting your equivalent to the lu8400g4v52l.tmp_ folder.

Eventually, we'll figure this out.

On Fri, Nov 3, 2017 at 11:44 AM, TheMac2017 notifications@github.com wrote:

im using LO 5.4.2.2, and python 3.5.4, and im still getting that cant find file message above (although im not getting a sql error)

any thoughts?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/madsailor/SMF-Extension/issues/24#issuecomment-341760612, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpZ7lqOvVADPr01QEdExxsAltasbGanks5sy0MKgaJpZM4QP5gP .

-- [dh]

TheMac2017 commented 6 years ago

got it, it appears to be the catalog pmap file was forcing the (1) in the file name.

i think because the download had a (1) in the oxt filename originally.

I deleted the .pmap, and all the tmp folders, renamed the oxt, and resinstalled.

worked fine.

strange error handing there...

Jacopoog commented 6 years ago

This is not an issue, but maybe it's my misuse of the Google formula. Can you eplain why if i search for "EURUSD" quote in Google i got a value, but the formula give me "CLOSE" as result? It happens also in the example files...

TheMac2017 commented 6 years ago

...

dhocker commented 6 years ago

Can you provide an example of your cell contents?

On Fri, Nov 3, 2017 at 6:29 PM, TheMac2017 notifications@github.com wrote:

What google?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/madsailor/SMF-Extension/issues/24#issuecomment-341851459, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpZ7gQXRzBt0xdpAyyOsOPJ9gOUU0RSks5sy6HOgaJpZM4QP5gP .

-- [dh]

Jacopoog commented 6 years ago

The formula is: =GETHISTORICALQUOTE("EURUSD"; TESTO(O20; "yyyy-mm-dd")) where "O20" cell value is the yesterday day. Please note that if yoo insert "EURUSD" in the Examplpe file, and change the date to today/yesterday, the result will be the same, iven if searching in Google the EURUSD the last close quote is available. Is maybe because EURUSD is a currency rate and not "linked" to a specifical market? (Like, i.e. NASDAQ:AAPL)

paulfeakins commented 6 years ago

I can't find any documentation on GETHISTORICALQUOTE ?

The example files seem to include: GETMORNINGFIN GETMORNINGQFIN GETMORNINGKEY

TheMac2017 commented 6 years ago

its in dhockers fork.

Its JUST GETHISTORICALQUOTE("SYMBOL","DATE")

Cell references or formulas dont need quotes constants do.

for example GETHISTORICALQUOTE (A4,TODAY()) will give the most recent closing price for the symbol in A4.

Jacopoog commented 6 years ago

Paul, If you read previous posts on this thread, will find a suggestion about the @dhocker SMF Extension FORK and usefult installation suggestions. The fork includes Google historical quotes. You can find it here: https://github.com/dhocker/SMF-Extension. Remember to uninstall any previous SMF extension, THEN update Python to v3 and its ambient path (as clearly suggested by DHocker), and THEN installa the forked SMF extension. Have fun! J

paulfeakins commented 6 years ago

Ah yep, thanks for that. Sounds like a lot of effort. Any chance the original will get fixed at some point or is this the only way to get stock prices in to a spreadsheet?

TheMac2017 commented 6 years ago

nope.

Hasn't been updated for 2 years.

Put on dhockers fork, its got a lot of other good stuff in it and he updates it.

its worth the effort.

paulfeakins commented 6 years ago

Good to know, I will indeed, thanks!

paulfeakins commented 6 years ago

Install issue, I'll start a new issue if it's not a simple one:

I'm running Windows 10 on this PC. I installed Python 3.6.3. Install path is: C:\Users\paulf\AppData\Local\Programs\Python\Python36-32 Installer won't let me change the path. I added PYTHONPATH to my Environment Variables, edited it to match the above install path.

I then get this: https://www.antropy.co.uk/images/screenshots/soffice.bin_2017-12-03_14-23-25.png

I'm probably doing something stupid - I am a developer but not a Python developer and don't have much experience with it.

dhocker commented 6 years ago

The error message says that sqlite was not found. This would indicate that your pathing is not correct. Does your PYTHONPATH have all directories?

In your case, your PYTHONPATH needs to be:

PYTHONPATH=C:\Users\paulf\AppData\Local\Programs\Python\Python36-32; C:\Users\paulf\AppData\Local\Programs\Python\Python36-32\Lib; C:\Users\paulf\AppData\Local\Programs\Python\Python36-32\Lib\site-packages; C:\Users\paulf\AppData\Local\Programs\Python\Python36-32\Lib\sqlite3; C:\Users\paulf\AppData\Local\Programs\Python\Python36-32\DLLs

Give that a check.

On Sun, Dec 3, 2017 at 8:25 AM, paulfeakins notifications@github.com wrote:

Install issue, I'll start a new issue if it's not a simple one.

I'm running Windows 10 on this PC. I installed Python 3.6.3. Install path is: C:\Users\paulf\AppData\Local\Programs\Python\Python36-32 Installer won't let me change the path. I added PYTHONPATH to my Environment Variables, edited it to match the above install path.

I then get this: https://www.antropy.co.uk/images/screenshots/soffice. bin_2017-12-03_14-23-25.png

I'm probably doing something stupid - I am a developer but not a Python developer and don't have much experience with it.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/madsailor/SMF-Extension/issues/24#issuecomment-348775091, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpZ7qBnJkqjef-Hww7Gl6SiwQreTRrXks5s8q88gaJpZM4QP5gP .

-- [dh]

paulfeakins commented 6 years ago

Thanks very much for the quick reply.

I reinstalled Python to this location: C:\Program Files (x86)\Python36-32

PYTHONPATH is now: https://www.antropy.co.uk/images/screenshots/SystemPropertiesAdvanced_2017-12-03_15-43-32.png

And you can see the sqlite3 folder exists: https://www.antropy.co.uk/images/screenshots/explorer_2017-12-03_15-44-45.png

Same error though.

paulfeakins commented 6 years ago

And the path seems correct:

C:\Users\paulf>echo %pythonpath% C:\Program Files (x86)\Python36-32;C:\Program Files (x86)\Python36-32\Lib;C:\Program Files (x86)\Python36-32\Lib\site-packages;C:\Program Files (x86)\Python36-32\Lib\sqlite3;C:\Program Files (x86)\Python36-32\DLLs;

dhocker commented 6 years ago

What version of LO are you using? I have LO 5.4.2.2 and I have python3 version 3.5 installed. You can check what version of python LO uses by doing the following.

  1. open a cmd prompt
  2. cd to c:\program files (x86)\Libreoffice 5\program
  3. run command python
  4. note version
  5. type exit() to end python

For version 5.4.2.2 this test shows that python is 3.5.4.

Since I have the latest LO and it uses python 3.5, I'm guessing your python 3.6 is a mismatch.

On Sun, Dec 3, 2017 at 9:46 AM, paulfeakins notifications@github.com wrote:

And the path seems correct:

C:\Users\paulf>echo %pythonpath% C:\Program Files (x86)\Python36-32;C:\Program Files (x86)\Python36-32\Lib;C:\Program Files (x86)\Python36-32\Lib\site-packages;C:\Program Files (x86)\Python36-32\Lib\sqlite3;C:\Program Files (x86)\Python36-32\DLLs;

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/madsailor/SMF-Extension/issues/24#issuecomment-348786449, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpZ7mrk0bufSQCpWV3KvBugkMV4mOSxks5s8sJXgaJpZM4QP5gP .

-- [dh]

paulfeakins commented 6 years ago

Thanks, the output is: Python 3.3.5 (default, Mar 31 2017, 07:04:42) [MSC v.1800 64 bit (AMD64)] on win32

paulfeakins commented 6 years ago

I got the latest LibreOffice and ran the above again, output is now: Python 3.5.4 (default, Nov 3 2017, 15:52:29) [MSC v.1900 64 bit (AMD64)] on win32

Error message when adding the extension is now slightly different: "(com.sun.star.uno.RuntimeException) { { Message = "<class 'ImportError'>: DLL load failed: %1 is not a valid Win32 application. (or '_sqlite3.*' is unknown), traceback follows\X000a File \"C:\Program Files\LibreOffice 5\program\pythonloader.py\", line 149, in writeRegistryInfo\X000a mod = self.getModuleFromUrl( locationUrl )\X000a File \"C:\Program Files\LibreOffice 5\program\pythonloader.py\", line 103, in getModuleFromUrl\X000a exec(codeobject, mod.dict)\X000a" https://www.antropy.co.uk/images/screenshots/soffice.bin_2017-12-04_07-59-33.png

dhocker commented 6 years ago

You need to uninstall python 3.6 and install python 3.5. The python version you install must match the python version that comes with LO (which is 3.5.4). You can find python 3.5.4 here: https://www.python.org/downloads/release/python-354/

On Mon, Dec 4, 2017 at 2:00 AM, paulfeakins notifications@github.com wrote:

I got the latest LibreOffice and ran the above again, output is now: Python 3.5.4 (default, Nov 3 2017, 15:52:29) [MSC v.1900 64 bit (AMD64)] on win32

Error message when adding the extension is now slightly different: "(com.sun.star.uno.RuntimeException) { { Message = "<class 'ImportError'>: DLL load failed: %1 is not a valid Win32 application. (or '_sqlite3.' is unknown), traceback follows\X000a File "C:\Program Files\LibreOffice 5\program\pythonloader.py", line 149, in writeRegistryInfo\X000a mod = self.getModuleFromUrl( locationUrl )\X000a File "C:\Program Files\LibreOffice 5\program\pythonloader.py", line 103, in getModuleFromUrl\X000a exec(codeobject, mod.dict*)\X000a" https://www.antropy.co.uk/images/screenshots/soffice. bin_2017-12-04_07-59-33.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/madsailor/SMF-Extension/issues/24#issuecomment-348886882, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpZ7kJIokjDTxQBFOjuGRuejnUWpgg5ks5s86a5gaJpZM4QP5gP .

-- [dh]

paulfeakins commented 6 years ago
  1. I uninstalled Python 3.6.
  2. I installed Python 3.5.4 from the link you kindly provided.
  3. I ran: cd "c:\program files\Libreoffice 5\program"
  4. I ran: python
  5. Output: Python 3.5.4 (default, Nov 3 2017, 15:52:29) [MSC v.1900 64 bit (AMD64)] on win32
  6. I updated my PYTHONPATH Environment Variable
  7. I opened LibreOffice Calc
  8. I attempted to reinstall the extension. 8 I got this error: (com.sun.star.uno.RuntimeException) { { Message = "<class 'ImportError'>: No module named 'sqlite3', traceback follows\X000a File \"C:\Program Files\LibreOffice 5\program\pythonloader.py\", line 149, in writeRegistryInfo\X000a mod = self.getModuleFromUrl( locationUrl )\X000a File \"C:\Program Files\LibreOffice 5\program\pythonloader.py\", line 103, in getModuleFromUrl\X000a exec(codeobject, mod.dict)\X000a File \"C:\Users\paulf\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\unopackages\lu115609w0q.tmp\SMF.oxt\smf.py\", line 33, in \X000a import morningstar\X000a File \"C:\Program Files\LibreOffice 5\program\uno.py\", line 347, in _uno_import\X000a return _builtin_import(name, *optargs, kwargs)\X000a File \"C:\Users\paulf\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\unopackages\lu115609w0q.tmp\SMF.oxt\morningstar.py\", line 19, in \X000a import smf\X000a File \"C:\Program Files\LibreOffice 5\program\uno.py\", line 347, in _uno_import\X000a return _builtin_import(name, *optargs, *kwargs)\X000a File \"C:\Users\paulf\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\unopackages\lu115609w0q.tmp\SMF.oxt\smf.py\", line 35, in \X000a import yahoo_hist\X000a File \"C:\Program Files\LibreOffice 5\program\uno.py\", line 347, in _uno_import\X000a return _builtin_import(name, optargs, kwargs)\X000a File \"C:\Users\paulf\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\unopackages\lu115609w0q.tmp\SMF.oxt\yahoo_hist.py\", line 76, in \X000a import sqlite3\X000a File \"C:\Program Files\LibreOffice 5\program\uno.py\", line 347, in _uno_import\X000a return _builtin_import(name, *optargs, **kwargs)\X000a\X000a", Context = (com.sun.star.uno.XInterface) @0 } }
paulfeakins commented 6 years ago

A restart of the computer seems to have fixed the issue, thanks for the help!

Now to see if some Stock Market Functions will run ...

paulfeakins commented 6 years ago

Works like a charm! Nice work!

Jacopoog commented 6 years ago

---REAL TIME QUOTES FROM GOOGLE --- I write here 'cause I didn't fund Issues-requests on @dhocker fork git page. Dave, as Google returNs historical quotes, do you think it should be possible to add "real time" quotes as query result? When I open a ticker page on Google Finance the last price can be viewed, not only the historical one, so... I will really appreciate, but don't want to be a woodpecker in your ears. Kindly J

dhocker commented 6 years ago

It will probably take me a while, but I'll look into. Usually free services aren't big on providing realtime data. I have seen cases where they actually block your request or slow the response down if you make too many consecutive calls.

All of this is why I switched to the Intrinio service.

If what you want is the current price of a stock (on an occasional basis) you might consider using Google Sheets and the GOOGLEFINANCE function. I have a Google sheet with a bunch of stocks. I pull up the sheet one or twice a day just to check the market.

On Sun, Feb 4, 2018 at 2:47 AM, jacopoog notifications@github.com wrote:

---REAL TIME QUOTES FROM GOOGLE --- I write here 'cause I didn't fund Issues-requests on @dhocker https://github.com/dhocker fork git page. Dave, as Google returNs historical quotes, do you think it should be possible to add "real time" quotes as query result? When I open a ticker page on Google Finance the last price can be viewed, not only the historical one, so... I will really appreciate, but don't want to be a woodpecker in your ears. Kindly J

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/madsailor/SMF-Extension/issues/24#issuecomment-362890905, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpZ7iNRQa70bKtvVjXIWIGyaqyk2vNdks5tRW6pgaJpZM4QP5gP .

-- [dh]

TheMac2017 commented 6 years ago

Have you looked at IEX?

dhocker commented 6 years ago

I'm not familiar with IEX. I'm always a little leery of services that are "free" as eventually companies have to monetize some or all services to have a viable business. However, it's worth some investigation (with a good look at their Ts and Cs for use).

On Sun, Feb 4, 2018 at 10:05 AM, TheMac2017 notifications@github.com wrote:

Have you looked at IEX?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/madsailor/SMF-Extension/issues/24#issuecomment-362918044, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpZ7jweTqEvu-FAuCPBvHs1q71YyGJ3ks5tRdVNgaJpZM4QP5gP .

-- [dh]

Jacopoog commented 6 years ago

OK @dhocker ! The Google spreadsheet can be a valid "temporary" solution... Just a Copy-and-paste from a "blind" google sheet into my super-complicated personal portfolio analysis sheet. Thank you

TheMac2017 commented 6 years ago

im getting 504 errors on the intrinio functions...

dhocker commented 6 years ago

That's a gateway error. I don't see any error here.

On Mon, Feb 5, 2018 at 5:47 PM, TheMac2017 notifications@github.com wrote:

im getting 504 errors on the intrinio functions...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/madsailor/SMF-Extension/issues/24#issuecomment-363260473, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpZ7vmF1P-6u5ra8b8ItKaKfq13hSdBks5tR5MHgaJpZM4QP5gP .

-- [dh]

TheMac2017 commented 6 years ago

hmmm...works at home.

must be my work server DNS again.

Jacopoog commented 6 years ago

Hi @dhocker, it's since March 16 that I cant' get Google formulas updates... I didn't changed my system but some misterious thing have happened without my attention. When I load ODS files the result of formula is OK. If I change the date (I trie also older dates), this error occurs: 'NoneType' object has no attribute 'close' I loaded the ODS example and it's the same thing. I tried updating LibreOffice to 6... So then tried uninstalling and reinstalling extension... but nothing changed. My "side" Python installation and path are untouched (PYTHONPATH points to c:\Python3\ ). Any idea? https://i.imgur.com/A44hgVz.png I hope Google didn't closed his APIs... After Yahoo, it could be annoying! Thanks and cheers in advance! J

dhocker commented 6 years ago

I'm afraid it looks like Google has terminated our ability to programmatically request historical price quotes. If you try the following URL you'll see what I mean:

https://finance.google.com/finance/historical?q=USIBX&startdate=2018-03-29&enddate=2018-03-29

You can substitute ticker symbol or date. My log shows the result is "Forbidden". If you paste this into a web browser you'll get a page that tells you the request is from a bot.

As an alternative, you might try the Intrinio service (I have changed most of my usage to it). Intrinio has functions for stocks, but I have found that it does not support mutual funds. Another service that is free is IEX Trading. However, that service has very little historical data.

You can find my LibreOffice Calc extension for Intrinio at https://github.com/qalydon/intrinio-localc.

If I find out any more about the Google Finance historical data situation I'll let you know.

On Sat, Mar 31, 2018 at 9:16 AM, jacopoog notifications@github.com wrote:

Hi @dhocker https://github.com/dhocker, it's since March 16 that I cant' get Google formulas updates... I didn't changed my system but some misterious thing have happened without my attention. When I load ODS files the result of formula is OK. If I change the date (I trie also older dates), this error occurs: 'NoneType' object has no attribute 'close' I loaded the ODS example and it's the same thing. I tried updating LibreOffice to 6 but nothing changed. My "side" Python installation and path are untouched (PYTHONPATH points to c:\Python3\ ). Any idea? https://i.imgur.com/A44hgVz.png I hope Google didn't closed his APIs... After Yahoo, it could be annoying! Thanks and cheers in advance! J

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/madsailor/SMF-Extension/issues/24#issuecomment-377696074, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpZ7vYGv2rwL06BpYnU360i1cxE8MwUks5tj4_EgaJpZM4QP5gP .

-- [dh]

Jacopoog commented 6 years ago

Dear @dhocker, I'm sad. Very sad. None of the "big companies" understands our little daily needs... It was for just a poor stupid spreadsheet, updated twice a week, only to know how far my money is going from me. Stupid stupid Google and Yahoo.

So, first of all thanks for your reply! Unfortunately Intrinio do not cover the quotes i need (I'm from Italy, and I have several type of investments to check also from local market: funds, ETFs...).

I tried to install IEX Extension, but got some path issue... immagine https://i.imgur.com/OXiPMnc.png I have a "side" Python3 var as PYTHONPATH in C:\Python3 and LibreOffice6 (but its user directory is listed as C:\Users\XYZ\AppData\Roaming\LibreOffice\4). Any suggestions? In order to go simpler, I think I could insert some "work sheets" with direct static link to some webpages (as Morningstar or GoogleFinance) and extract the quote value from there... It will not be a problem. But, damn, I like your extensions! It's more elegant, and quick, and clean to use 1 single formula... I will feel much more sad if I can't exploit your great nice job. Please, Dave accept my deep and sincere gratitude for A-N-Y S-I-N-G-L-E T-I-M-E my ODS file updated silently in the last 3 maybe 4 years!!!

TheMac2017 commented 6 years ago

I've been forced to move to Google sheets due to a lack of a simple current quote.

dhocker commented 6 years ago

I fixed some Windows based issues with the IEX extension and posted a new release to https://github.com/qalydon/iex-localc/releases. I do most of my development on macOS and I had never really tried the extension on Windows. If you try the IEX extension again and run into any problems please open an issue from https://github.com/qalydon/iex-localc/issues. This particular email is has grown a bit long. 🙂

I use Google Sheets in addition to LO Calc. In particular I have a sheet that I use to watch a bunch of stocks on a daily basis. However, I use LO Calc for some bigger spreadsheets where I need historical information for several years.

Finally, if you want to give Intrinio a try, look at https://github.com/qalydon/intrinio-localc.

Good luck.

On Sun, Apr 1, 2018 at 10:58 AM, TheMac2017 notifications@github.com wrote:

I've been forced to move to Google sheets due to a lack of a simple current quote.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/madsailor/SMF-Extension/issues/24#issuecomment-377796510, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpZ7gFhpeNtIxvY8CXlBTzPUX0LnCGkks5tkPkjgaJpZM4QP5gP .

-- [dh]

TheMac2017 commented 6 years ago

didnt even know you had made an IEX extention.

ill take a look at it.

I use intrilnio, but they dont have a intra-day current quote, and i frequently exceed the call limit.