Datalux / Osintgram

Osintgram is a OSINT tool on Instagram. It offers an interactive shell to perform analysis on Instagram account of any users by its nickname
GNU General Public License v3.0
9.52k stars 2.09k forks source link

ClientError URLError <urlopen error _ssl.c:980: The handshake operation timed out> (Code: 0, Response: ) #670

Open AhamedRR opened 1 year ago

AhamedRR commented 1 year ago

Traceback (most recent call last): File "/home/nightmare/Tools/Osintgram/main.py", line 121, in api = Osintgram(args.id, args.file, args.json, args.command, args.output, args.cookies) File "/home/nightmare/Tools/Osintgram/src/Osintgram.py", line 47, in init self.login(u, p) File "/home/nightmare/Tools/Osintgram/src/Osintgram.py", line 1129, in login error = json.loads(e.error_response) File "/usr/lib/python3.10/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/usr/lib/python3.10/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Elizura commented 1 year ago

what is this problem and how can I fix it?

Elise0177 commented 8 months ago

The fact that you received an error when you ran the main.py script using the Microsoft command sudo python3 main.py indicates a problem during program execution. Here, everything regarding the start of the command execution went fine, but some error occurred during execution. Let's look at the error message to understand what went wrong.

The error ClientError URLError indicates that a timeout occurred while trying to establish a secure SSL connection. This can be caused by various reasons, such as problems with the network connection, unavailability of the remote server, incorrect proxy or firewall settings, inability to correctly verify SSL certificates, etc.

Judging by the following error line error = json.loads(e.error_response), the problem occurred when trying to parse the server response body as JSON. The error Expecting value: line 1 column 1 (char 0) indicates that the response body was expected to be in JSON format, but was empty instead.

It is not necessary that these errors are due to flaws in the script code. It is possible that the source of the problem is external conditions, such as communication problems. At the same time, it is worth checking the following:

Network connection status: Make sure your network connection is stable and not blocked by any external factors (such as a firewall or proxy).

Server status: If possible, ensure that the remote server the script is trying to connect to is accessible and functioning correctly.

SSL Configuration: If the script uses special settings for an SSL connection, make sure they are correct.

Using sudo: Sometimes using sudo can change the execution context of a script, for example by changing environment variables that can affect network operation. Make sure that the script actually requires superuser privileges to run.

If the problem continues, it may be helpful to consult the documentation for the API you are using, or use network debugging tools (such as curl or wget) to test the connection to the server without running the entire script. You can also try running the script with different parameters or in a different network environment to diagnose the problem.