[Solved] Error reading https webpage with python on Windows

Keyboard macros or custom scripts

[Solved] Error reading https webpage with python on Windows

Postby fredrikl » Sat Apr 17, 2021 6:52 pm

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 Mon Apr 19, 2021 1:20 am, edited 5 times in total.
OpenOffice.org Portable 3.2.0, Windows 7
fredrikl
 
Posts: 11
Joined: Wed Feb 20, 2013 5:17 pm

Re: Error reading https webpage with python on Windows 10

Postby fredrikl » Sat Apr 17, 2021 10:59 pm

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: 11
Joined: Wed Feb 20, 2013 5:17 pm

Re: Error reading https webpage with python on Windows 10

Postby fredrikl » Sun Apr 18, 2021 8:54 pm

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: 11
Joined: Wed Feb 20, 2013 5:17 pm


Return to OpenOffice Basic, Python, BeanShell, JavaScript

Who is online

Users browsing this forum: No registered users and 4 guests