jotyGill / openpyn-nordvpn

Easily connect to and switch between, OpenVPN servers hosted by NordVPN on Linux (+patch leakes)
GNU General Public License v3.0
628 stars 114 forks source link

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) #279

Closed OleksiyHimranov closed 2 years ago

OleksiyHimranov commented 2 years ago

`$ openpyn us

Traceback (most recent call last): File "/home/ninja/.local/bin/openpyn", line 11, in sys.exit(main()) File "/home/ninja/.local/lib/python3.6/site-packages/openpyn/openpyn.py", line 144, in main args.skip_dns_patch, args.silent, args.nvram, args.openvpn_options, args.location) File "/home/ninja/.local/lib/python3.6/site-packages/openpyn/openpyn.py", line 395, in run dedicated, double_vpn, tor_over_vpn, anti_ddos, netflix, location, stats) File "/home/ninja/.local/lib/python3.6/site-packages/openpyn/openpyn.py", line 473, in find_better_servers netflix=netflix, location=location) File "/home/ninja/.local/lib/python3.6/site-packages/openpyn/api.py", line 38, in get_data_from_api json_response = get_json(url) File "/home/ninja/.local/lib/python3.6/site-packages/openpyn/api.py", line 20, in get_json json_response = requests.get(url, headers=headers).json() File "/home/ninja/.local/lib/python3.6/site-packages/requests/models.py", line 910, in json return complexjson.loads(self.text, **kwargs) File "/usr/lib/python3.6/json/init.py", line 354, in loads return _default_decoder.decode(s) File "/usr/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) `

CodeMonkeyLab commented 2 years ago

Hi, I will assume you running ubuntu based distro and recently did update. Run the following

sudo python3 -m pip install --upgrade openpyn

If this works/does not work please comment back here

larry77 commented 2 years ago

Same issue for me and the

sudo python3 -m pip install --upgrade openpyn

thing did not change the situation. I have this on 2 machines running debian 11.

jotyGill commented 2 years ago

Nordvpn API is currently not returning anything. it's probably temporary issue. unless they are actively blocking these requests. In the mean time, manually connect to servers like. openpyn -s uk1402

you can find the list of servers in files/ovpn_udp folder.

Find the installation path from the error, it can be different for different OSs. For example for the above user it's ~/.local/lib/python3.6/site-packages/openpyn/files/ovpn_udp

OleksiyHimranov commented 2 years ago

$ openpyn -v openpyn 2.7.5 Same situation Ubuntu Server 18.04.4 and Kali Linux

larry77 commented 2 years ago

Now the openpyn scripts work again on my machine.

OleksiyHimranov commented 2 years ago

Today issue was gone! Everyone, Thanks for help!