Error reading https webpage with python on Windows

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
fredrikl
Posts: 12
Joined: Wed Feb 20, 2013 5:17 pm

Error reading https webpage with python on Windows

Post by fredrikl »

Hi. I just wounder if anyone have been successful reading a https webpage from AOO 4.1.8 or 4.1.9 using python on Windows 10. I have created a .py file which runs fine with AOO 4.1.9 on linux and Mac Os X. It also runs fine in LibreOffice on Windows which uses Python 3 instead of Python 2.7.18. The script also runs fine in AOO on Windows if I use a http and not a https address. I have maybe found some solutions on the internet but all require that I "import ssl" in my python script which gives me an import error on Windows 10 but not on linux. This makes me think that the python that is included with AOO 4.1.8 and 4.1.9 has been complied without ssl support or something similar. My script has different code for python 3 and python 2 and I know that the python 2 segment of the code runs with AOO both on Windows and Linux as expected and that the python 3 code runs with LibreOffice.
Last edited by fredrikl on Wed Jul 07, 2021 7:59 pm, edited 6 times in total.
OpenOffice.org Portable 3.2.0, Windows 7
fredrikl
Posts: 12
Joined: Wed Feb 20, 2013 5:17 pm

Re: Error reading https webpage with python on Windows 10

Post by fredrikl »

Partially solved because I went over to a friend and I can not reproduce the problem there with PortableApps AOO 4.1.8. I tested to reinstall PortableApps AOO 4.1.8 on my computer and the script worked one time but after that the script did not work. On my friends computer I can run the script as many times as I want with good result. Also tried "import ssl" on my friends computer and got the error message there which means that "import ssl" has nothing to do with if it is possible to read an https web page. So it seams like the problem is something with my Windows 10 rather than AOO because my friend also has Windows 10 and the exactly the same version 10.0.19041.906. The error message is by the way "unknown url type: https".
OpenOffice.org Portable 3.2.0, Windows 7
fredrikl
Posts: 12
Joined: Wed Feb 20, 2013 5:17 pm

Re: Error reading https webpage with python on Windows 10

Post by fredrikl »

I have not been able to find out why this happens on my computer but mark this thread as solved beause I had no problems on my friends computer.
OpenOffice.org Portable 3.2.0, Windows 7
fredrikl
Posts: 12
Joined: Wed Feb 20, 2013 5:17 pm

Re: Error reading https webpage with python on Windows

Post by fredrikl »

Removed [Solved] from my first post as I have now tried to connect to https web pages with python from OpenOffice 4.1.10 on 3 more Windows 10 computers and I realize that it's not working on them either so it means that I now have problem with that on 4 out of 5 computers. (It's mainly an Windows issue and not an Mac OS X or Linux issue but a friend that uses the same script on Mac OS has experienced the error message a few times). If anyone has any clue to what to do about this please let me know. Otherwise I think I will have to wait until Apache OpenOffice is updated from Python 2.7.18 to Python 3 as it seams complicated for me to update the Python version or add better tls / ssl support or whatever is needed.
OpenOffice.org Portable 3.2.0, Windows 7
Post Reply