On Dec 23, 2020, at 12:03, Rich Gattie <mob...@gmail.com> wrote:

> While trying my hand with some python code and the web api, I have come 
> across an issue I am not sure how to resolve, other than something obvious I 
> can do, but wanted to run this by the list and see what was the technical 
> reason for it. 
> 
> I have some carts setup in the TRAFFIC group and they are just number 00001 - 
> 00007. WHen trying to list them in my code, I get an error with the leading 
> zeros:
> 
>  "leading zeros in decimal integer literals are not permitted; use an 0o 
> prefix for octal integers"
> 
> I add the '0o' and try again and get a 404. Same thing for the demo page that 
> comes with Rivendell, /rd-bin/listcart.html
> Nothing comes up when I do a GROUP_NAME list either, saying that group 
> doesn't exist. I guess because of the numbering, that there is no relation to 
> the group in the SQL and that is why I get a 404 when I run my code. 
> I can see the carts in the DB using DBeaver, so they are there, and they do 
> play when scheduled in the logs. 
> 
> Is there any way to see them with the web api other than reimporting them 
> into the group with different cart numbers? There is only 7 of them, so it's 
> not like it's a pain. But this is more for my own curiosity. 

It’s a common convention in many programming languages to treat a leading zero 
on an integer value as being octal (base 8). Likewise, integers that start with 
‘0x’ are often assumed to be hexadecimal (base 16). To work around this, simply 
don’t use leading zeros when specifying those cart numbers.

Cheers!


|---------------------------------------------------------------------|
| Frederick F. Gleason, Jr. |             Chief Developer             |
|                           |             Paravel Systems             |
|---------------------------------------------------------------------|
|         A room without books is like a body without a soul.         |
|                                                                     |
|                                                         -- Cicero   |
|---------------------------------------------------------------------|

_______________________________________________
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev

Reply via email to