Cron Jobs

Post your tips and tricks here
KE7FNS
Posts: 1125
Joined: Wed Apr 17, 2019 11:11 pm

Re: Cron Jobs

Post by KE7FNS » Tue Sep 08, 2020 7:29 pm

AF6VN wrote:
Tue Sep 08, 2020 1:14 pm
KE7FNS wrote: ↑Mon Sep 07, 2020 1:02 pm
I didn't devote any time digging into the actual bmapi script written by Andy at all. I just looked at the error codes and noticed that they are not a script related to Pi-star at all. They are scripts that belong to the python installation itself.
The imported modules are standard Python library routines.
Is there a reason why you repeat to me what I just said in my previous post?
AF6VN wrote:
Tue Sep 08, 2020 1:14 pm
The error states that the first character (char 0) does not match a valid JSON object (which likely means it is not something like {, [, or ( ). Unfortunately, the exception formatting does not /print/ "s" to show what it found (it is passed to the exception only for use in computing the line/column values).
BM API keys don't use any of those characters, so the scripts shouldn't be expecting one, ESPECIALLY at the start.
AF6VN wrote:
Tue Sep 08, 2020 1:14 pm
While the shell script is finding /something/ for the API Key, I think I'd go on Brandmeister, invalidate the existing key, and generate a new key to be cut&pasted into Pi-Star's BM configuration page. Possible a key is there, but it is corrupted.
If the BM API key is invalid for the user you get a totally different error. I tested it by modifying mine.

Code: Select all

Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: 'NoneType' object is not subscriptable
Also if the BM API key is invalid the BM controls on the ADMIN page don't work properly.

Doubtful it is a key issue.
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:

VK2FMET
Posts: 73
Joined: Fri Dec 20, 2019 1:19 am

Re: Cron Jobs

Post by VK2FMET » Wed Sep 09, 2020 1:38 am

Well it's not the image or the scripts being corrupted.
I re-imaged and re-built my hotspot.
I can confirm that the scripts work up until the point I fully populate my gateway script with re-write rules.
I tested the addtg command before I finished the rebuild and it worked so it looked promising. Then I tried the deltg command and it fell over again.
Now that I am finished - the result is as per my original post.
I have compared the current scripts with my previous ones and there is no difference.

It has to be the script logic not liking my stanza content or the number of servers I use.

I have the following enabled:
XLX
Brandmeister
IPSC2-Quadnet
IPSC2-VKHOTSPOTS
DMR2YSF
TGIF

My BM Key is fine since I have the manager and it works fine.
Alan
VK2FMET

KE7FNS
Posts: 1125
Joined: Wed Apr 17, 2019 11:11 pm

Re: Cron Jobs

Post by KE7FNS » Wed Sep 09, 2020 3:03 am

VK2FMET wrote:
Wed Sep 09, 2020 1:38 am
I can confirm that the scripts work up until the point I fully populate my gateway script with re-write rules.
Thats unexpected. :shock:
VK2FMET wrote:
Wed Sep 09, 2020 1:38 am
It has to be the script logic not liking my stanza content or the number of servers I use.
I concur with that assessment, wonder what it is it doesn't like.
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:

AF6VN
Posts: 495
Joined: Fri Jul 20, 2018 1:15 am

Re: Cron Jobs

Post by AF6VN » Wed Sep 09, 2020 8:36 pm

KE7FNS wrote:
Tue Sep 08, 2020 7:29 pm
Is there a reason why you repeat to me what I just said in my previous post?
Because the imported modules are NOT SCRIPTS per se. They are in essence function libraries.

The only "script" is the command line string itself which is doing the import.
BM API keys don't use any of those characters, so the scripts shouldn't be expecting one, ESPECIALLY at the start.
But it isn't the key that is being processed -- the Python portion has nothing to do with BM API keys; it is attempting to parse a JSON encoded result string returned by the server.

--
AF6VN
Dennis L Bieber

KE7FNS
Posts: 1125
Joined: Wed Apr 17, 2019 11:11 pm

Re: Cron Jobs

Post by KE7FNS » Wed Sep 09, 2020 10:11 pm

AF6VN wrote:
Wed Sep 09, 2020 8:36 pm
Because the imported modules are NOT SCRIPTS per se. They are in essence function libraries.
The imported modules have a filename extension of .py. They are commonly referred to as the generic term scripts even if they contain library routines.

https://whatis.techtarget.com/fileforma ... 20programs.

https://fileinfo.com/extension/py
AF6VN wrote:
Wed Sep 09, 2020 8:36 pm
The only "script" is the command line string itself which is doing the import.
If I see a .py file on any computer filesystem, I'm calling it a script without even looking inside of it. I don't know of any programmer that would call it anything else.
AF6VN wrote:
Wed Sep 09, 2020 8:36 pm
But it isn't the key that is being processed -- the Python portion has nothing to do with BM API keys; it is attempting to parse a JSON encoded result string returned by the server.
I TOLD you I didn't spend ANY time looking at Andys script, or the python scripts. I drew from the information you posted.
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:

Post Reply