Windows 10 vs Windows 11 lazarus / 8-Other ---------------------------------------------------------------------- stansbkg · 2023-06-27 15:16 I am scraping data from a web page. The instruction      page := client.get(' [target URL] '); works fine on a Windows 10 machine, but the idetical program fails to download on a Windows 11 machine. For both machines, I'm using Version 1.0.12 2021/05/15 (Complier 'version 3.2.2). Is there a difference between Windows 10 and Windows 11 implementation? ---------------------------------------------------------------------- domasz · 2023-06-27 15:22 What library you use? Is the url http:// or https://? What version of Lazarus? ---------------------------------------------------------------------- stansbkg · 2023-06-27 15:51 This is at the start of the code:    {$mode objfpc} {$ifdef windows} {$apptype console} {$endif}    Uses      sysutils, classes, fphttpclient, openssl, opensslsockets, dos, kgs; "kgs" is a unit I wrote. How do I determine the version of Lazarus? ---------------------------------------------------------------------- stansbkg · 2023-06-27 16:07 I have tried both http & https, and the same results happen. ---------------------------------------------------------------------- TRon · 2023-06-27 16:32 Quote from: stansbkg on June 27, 2023, 05:51:09 pmThis is at the start of the code: No actual code, then it is not possible to determine the mistake/error/incompatibility. You do not even mention the error code that you receive let alone if you check for that. All we have now is a "it does work here, it does not work there" There is no difference between windows versions when it comes to httpclient. What can be different however is the version of the ssl libraries (and/or bitness). QuoteHow do I determine the version of Lazarus? not important as you seem to be using the TUI IDE version of Pascal. For examples on how to use httpclient, see https://wiki.freepascal.org/fphttpclient ---------------------------------------------------------------------- stansbkg · 2023-06-27 18:37 My code uses the "try...except" statement, "try" is followed by the "Page :=..." statement in my first post. My Windows 11 machine executes the "except" portion, but I don't see any failure code. The Windows 10 machine bypasses the "except" portion. ---------------------------------------------------------------------- Soner · 2023-06-27 18:47 What is the exception message or code? Use this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  try   page := client.get(' [target URL] '); except   On E:Exception do ShowMessage(E.Message); end; ---------------------------------------------------------------------- stansbkg · 2023-06-27 18:55 Compiler said -- Error: Identifier not found "ShowMessage" ---------------------------------------------------------------------- TRon · 2023-06-27 19:09 Replace the showmessage with a writeln. TS is not using Lazarus so showmessage is not available. Besides that, if you run the application in a terminal window it should show the exception no matter what. ---------------------------------------------------------------------- stansbkg · 2023-06-27 19:41 New compiler message -- Error: Identifier not found "On" I'm really confused now. It compiled with "Showmessage," but gave this error message when I replaced it with "writeln." I will proceed using only the version on my Windows 10 machine. You've been very helpful and patient. Thanks. ---------------------------------------------------------------------- TRon · 2023-06-27 19:45 Compile your application with mode OBJFPC or mode DELPHI and include unit sysutils in your uses clause.. ---------------------------------------------------------------------- Thaddy · 2023-06-28 13:35 Quote from: TRon on June 27, 2023, 09:09:51 pmReplace the showmessage with a writeln. TS is not using Lazarus so showmessage is not available. Besides that, if you run the application in a terminal window it should show the exception no matter what. Or use a little macro:Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i {$macro on}{$define ShowMessage := WriteLn} ---------------------------------------------------------------------- stansbkg · 2023-06-29 16:29 I found what was the problem. ssleay32.dll and libeay32.dll were in the wrong folder on the offending computer.