API Entry error

Hi all!
Trying to get Satnogs setup on a Raspberry PI4. I have everything working but when I go to the cmd satnogs-setup and click the basic line and enter my API Key I get the following:

Traceback (most recent call last): x mqqqqqqqqqqqqqqqqqqqqqqqqj x
File “/var/lib/satnogs-config/bin/satnogs-config”, line 8, in qqqqqqqqqqqqqqqqu
sys.exit(main()) x < Save > x
File “/var/lib/satnogs-config/lib/python3.9/site-packages/satnogsconfig/init.py”, line 25, in main
menu.show()
File “/var/lib/satnogs-config/lib/python3.9/site-packages/satnogsconfig/menu.py”, line 241, in show
self._typesmenu[‘type’]
File “/var/lib/satnogs-config/lib/python3.9/site-packages/satnogsconfig/menu.py”, line 311, in _variablebox
self._config.set_variable(menu[‘variable’], value)
File “/var/lib/satnogs-config/lib/python3.9/site-packages/satnogsconfig/config.py”, line 87, in set_variable
self.dump_config(to_file=True)
File “/var/lib/satnogs-config/lib/python3.9/site-packages/satnogsconfig/config.py”, line 46, in dump_config
with open(self._filename, ‘w’, encoding=‘utf-8’) as file:
PermissionError: [Errno 13] Permission denied: ‘/etc/ansible/host_vars/localhost’
kb8uyc@raspberrypi:~ $

Anyone that can help me out? I’m not very good with linux so please go easy on me!

Thanks

Eric

Hi @kb8uyc and welcome!

This error doesn’t seem to be related with the API Key. It looks something else but I’m not sure what.

Can you generate and copy paste here the support report:

Go to the menu item Advanced -> Support from sudo satnogs-setup. I may take 1-2min to generate it, when is done share it here.

I think the command should be run with sudo:
sudo satnogs-setup

Maybe this could be the problem.

1 Like

I’ve spent the last few hours trying to get connected but cannot. I don’t think my RSP1A is being recognized. I have the latest API installed and all the fields under basic. However I’m still being shown offline. I’m not a pro when it comes to code and stuff but I try but I cannot figure out what I’m doing wrong.

{
“versions”: {
“satnogs-client”: “1.8.1”,
“satnogs-client-ansible”: “202209101521”,
“satnogs-flowgraphs”: “1.4-1”,
“gr-satnogs”: “2.3.1.1-1”,
“gr-soapy”: “2.1.3.1-1”,
“gnuradio”: “3.8.2.0-14”,
“satnogs-config”: “0.13.2”
},
“state”: {
“is-applied”: true,
“pending-tags”: null
},
“system”: {
“date”: “2023-06-10T22:17:48.519038+00:00”,
“distribution”: {
“DESCRIPTION”: “Raspbian GNU/Linux 11 (bullseye)”,
“RELEASE”: “11”,
“CODENAME”: “bullseye”,
“ID”: “Raspbian”
},
“pending-updates”: true,
“platform”: {
“system”: “Linux”,
“node”: “raspberrypi”,
“release”: “5.15.61-v7l+”,
“version”: “#1579 SMP Fri Aug 26 11:13:03 BST 2022”,
“machine”: “armv7l”
},
“memory”: {
“total”: 8282615808,
“available”: 7902232576,
“percent”: 4.6,
“used”: 145084416,
“free”: 7902638080,
“active”: 140365824,
“inactive”: 139706368,
“buffers”: 23420928,
“cached”: 211472384,
“shared”: 1024000,
“slab”: 34648064
},
“disk”: {
“total”: 30430949376,
“used”: 4522905600,
“free”: 24616648704,
“percent”: 15.5
}
},
“configuration”: {
“satnogs_antenna”: “RX”,
“satnogs_api_token”: “[redacted]”,
“satnogs_log_level”: “Warning”,
“satnogs_rx_samp_rate”: “0.25,1.024,1.536,1.792,1.92,2.048,2.16,2.56,2.88,3.2MSps”,
“satnogs_soapy_rx_device”: “driver=SDRPlay”,
“satnogs_station_elev”: “230m”,
“satnogs_station_id”: “3163”,
“satnogs_station_lat”: “42.248”,
“satnogs_station_lon”: “-83.588”
}
}

I’m probably totally wrong considering I’m only getting started with satnogs.

Comparing to my setup should the rx samp rate just be a single value.
For example mine is set to 2.048e6

Mark

satnogs_station_elev should be 230, not 230m. this will probably make the client terminate.

then, as ei4fnb said, satnogs_rx_samp_rate should be a single value like 2.048e6 or whatever the sdrplay supports. this will just make any obs fail, not hinder the client from going online thou.

Thanks for the suggestions. I’ve corrected those. However, profile says I’m still offline. I done a sudo systemctl status satnogs-client and it says it’s loaded and active.

satnogs-client.service - SatNOGS client
Loaded: loaded (/etc/systemd/system/satnogs-client.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2023-06-12 16:06:59 EDT; 1s ago
Main PID: 22092 (satnogs-client)
Tasks: 1 (limit: 4915)
CPU: 1.739s
CGroup: /system.slice/satnogs-client.service
└─22092 /var/lib/satnogs/bin/python /var/lib/satnogs/bin/satnogs-client

Jun 12 16:06:59 raspberrypi systemd[1]: Started SatNOGS client.
Jun 12 16:07:02 raspberrypi satnogs-client[22092]: Traceback (most recent call last):
Jun 12 16:07:02 raspberrypi satnogs-client[22092]: File “/var/lib/satnogs/bin/satnogs-client”, line 5, in
Jun 12 16:07:02 raspberrypi satnogs-client[22092]: from satnogsclient import main
Jun 12 16:07:02 raspberrypi satnogs-client[22092]: File “/var/lib/satnogs/lib/python3.9/site-packages/satnogsclient/init.py”, line 19, in
Jun 12 16:07:02 raspberrypi satnogs-client[22092]: logging.basicConfig(format=settings.LOG_FORMAT, level=getattr(logging, settings.LOG_LEVEL))
Jun 12 16:07:02 raspberrypi satnogs-client[22092]: AttributeError: module ‘logging’ has no attribute ‘Warning’
Jun 12 16:07:02 raspberrypi systemd[1]: satnogs-client.service: Main process exited, code=exited, status=1/FAILURE
Jun 12 16:07:02 raspberrypi systemd[1]: satnogs-client.service: Failed with result ‘exit-code’.
Jun 12 16:07:02 raspberrypi systemd[1]: satnogs-client.service: Consumed 3.267s CPU time.
Jun 12 16:07:02 raspberrypi systemd[1]: satnogs-client.service: Scheduled restart job, restart counter is at 47324.
Jun 12 16:07:02 raspberrypi systemd[1]: Stopped SatNOGS client.
Jun 12 16:07:02 raspberrypi systemd[1]: satnogs-client.service: Consumed 3.267s CPU time.
Jun 12 16:07:02 raspberrypi systemd[1]: Started SatNOGS client.

Ah, missed that one, satnogs_log_level="WARNING" as specified here, it is uppercase.

Got that changed as well. Not sure if I mentioned it or not I’m using SDRplay RSP1A and I have followed the instructions for applying the drivers. I believe I’ve done it correctly but still I’ve never been seen online and station is showing offline on the dashboard and says I should make sure it can successfully connect to the Network API. I’ve also confirmed wireless internet is working as well.

Why am I unauthorized?

satnogs-client.service - SatNOGS client
Loaded: loaded (/etc/systemd/system/satnogs-client.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2023-06-12 17:45:33 EDT; 4min 25s ago
Main PID: 432 (satnogs-client)
Tasks: 4 (limit: 4915)
CPU: 3.912s
CGroup: /system.slice/satnogs-client.service
└─432 /var/lib/satnogs/bin/python /var/lib/satnogs/bin/satnogs-client

Jun 12 17:45:42 raspberrypi satnogs-client[432]: resp = self.send(prep, **send_kwargs)
Jun 12 17:45:42 raspberrypi satnogs-client[432]: File “/var/lib/satnogs/lib/python3.9/site-packages/requests/sessions.py”, line 701, in send
Jun 12 17:45:42 raspberrypi satnogs-client[432]: r = adapter.send(request, **kwargs)
Jun 12 17:45:42 raspberrypi satnogs-client[432]: File “/var/lib/satnogs/lib/python3.9/site-packages/requests/adapters.py”, line 565, in send
Jun 12 17:45:42 raspberrypi satnogs-client[432]: raise ConnectionError(e, request=request)
Jun 12 17:45:42 raspberrypi satnogs-client[432]: requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘network.satnogs.org’, port=443): Max retries exceeded with url: /api/jobs/?ground_station=3163&lat=42.248&l>
Jun 12 17:46:42 raspberrypi satnogs-client[432]: satnogsclient.scheduler.tasks - ERROR - 401 Client Error: Unauthorized for url: https://network.satnogs.org/api/jobs/?ground_station=3163&lat=42.248&lon=-83.588&alt=230
Jun 12 17:47:42 raspberrypi satnogs-client[432]: satnogsclient.scheduler.tasks - ERROR - 401 Client Error: Unauthorized for url: https://network.satnogs.org/api/jobs/?ground_station=3163&lat=42.248&lon=-83.588&alt=230
Jun 12 17:48:43 raspberrypi satnogs-client[432]: satnogsclient.scheduler.tasks - ERROR - 401 Client Error: Unauthorized for url: https://network.satnogs.org/api/jobs/?ground_station=3163&lat=42.248&lon=-83.588&alt=230
Jun 12 17:49:43 raspberrypi satnogs-client[432]: satnogsclient.scheduler.tasks - ERROR - 401 Client Error: Unauthorized for url: https://network.satnogs.org/api/jobs/?ground_station=3163&lat=42.248&lon=-83.588&alt=230
~

Can you please check if the API value configured is correct.

sudo satnogs-setup → Basic → SATNOGS_API_TOKEN.

The token can be found at https://network.satnogs.org/users/kb8uyc/ selecting API Key

image

SatNOGS Network - Ground Station Eric Chambers is the link to my satnogs network page. KB8UYC is just the username I chose for my pi. I have triple checked the API token and it is correct.

OK well seems that triple checking is not enough. I was 1 number off. Gesh! System is now showing in testing mode! Thanks for all the help guys.

2 Likes

The API token is your authorization towards the network and could explain the ERROR - 401 Client Error: Unauthorized

Please also have a look at /etc/default/satnogs-client that is the file that is generated after selecting apply when running sudo satnogs-setup

It should contain the following where the API value is yours.

SATNOGS_API_TOKEN="your api value"

@kb8uyc

Where you able to have a look based on my last post?
A, wait I saw you station online. Good news.