cmallwitz / Financials-Extension

Extension for LibreOffice Calc to access stock market data
Other
137 stars 17 forks source link

ssl cert verify failed #35

Closed Madpot44 closed 2 years ago

Madpot44 commented 2 years ago

Hi there,

How would you suggest to deal with error message concerning ssl certificate, as you may see on the picture below?

Zrzut ekranu 2021-09-7 o 19 31 06
cmallwitz commented 2 years ago

Interesting... What operation system are you using?

The error would indicate an issue with either our python3 installation or maybe the certificates installed in your OS.

Madpot44 commented 2 years ago

MacOS 11.5

cmallwitz commented 2 years ago

OK - I don't have access to a MacOS instance myself.

Could you check which python is being used by your LibeOffice? You could do this by putting this in a LO Calc cell

=GETREALTIME("SUPPORT")

This function of my extension will return some text including a line with sys.executable

On my Linux system it says /usr/bin/python3

Now open a command line shell/terminal and run the value of sys.executable (/usr/bin/python3 in my case). This should start an interactive python prompt. Please run the following commands form there:

import urllib.request urllib.request.urlopen(urllib.request.Request("https://finance.yahoo.com/")).status 200 (this is output from previous line) quit

As you can see, my python3 returns a valid status code when accessing Yahoo through HTTPS.

What does it output for you?

gb13717 commented 2 years ago

Hi I have the same issue on MacOS. The value of sys.executable is /Applications/LibreOffice.app/Contents/MacOS/soffice

On my system python3 is installed at: /opt/homebrew/opt/python3

I get the same valid status code 200 when I run the commands you have

thanks for the util I appreciate it!

cmallwitz commented 2 years ago

Are you on LibreOffice (most recent) version 7.2 ? I can reproduce the issue locally with 7.2 - the LibreOffice guys must have broken something in this version. I never had reports about SSL issues < version 7.2

I will take closer look...

cmallwitz commented 2 years ago

I released a new version 3.0.4 working around the SSL issue on MacOS. The underlying problem is with the Python installation/package that ships with LibreOffice and I think it is too much to ask users to fix this manually.

Let me know if this fixes the problem for you.

gb13717 commented 2 years ago

yes that fixed it thanks!