What is the max length of strings in Indigo variables?

Posted on
Fri Aug 03, 2018 11:21 am
mundmc offline
Posts: 306
Joined: Sep 14, 2012

What is the max length of strings in Indigo variables?

I’m writing a hacky script that uses a dict stored as a long-ass string in an Indigo variable (because I haven’t started trying to write a plugin yet).

Basically, I want to store a series of URL’s for the dynamic refreshing image plugin. I was gonna keep each URL in a separate Indigo variable and rotate through, but it’s easier to just put them all in one gigantic dict.


Sent from my iPhone using Tapatalk

Posted on
Fri Aug 03, 2018 11:42 am
jay (support) offline
Site Admin
User avatar
Posts: 14756
Joined: Mar 19, 2008
Location: Austin, Texas

Re: What is the max length of strings in Indigo variables?

Big. You won't have a problem.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Aug 03, 2018 11:47 am
mundmc offline
Posts: 306
Joined: Sep 14, 2012

Re: What is the max length of strings in Indigo variables?

Sweet. I won’t even make big dict jokes.

Many thanks

Posted on
Mon Aug 13, 2018 11:27 am
mundmc offline
Posts: 306
Joined: Sep 14, 2012

Re: What is the max length of strings in Indigo variables?

So I’ve got a gigantic dictionary that is built and stored as a string in an Indigo variable. Trouble is- Everything worked fine in my testing (in pythonista) with a test string, but I’m getting all sort of Unicode-related errors around string and log functions now.

I have been using:
Code: Select all
 myDict = ast.literal_eval(dictSource)


... to make a dict from the string.

I guess my question:
1) Does Indigo encode text into Unicode when it’s placed in an indigo variable?
2) If so, can I just encode any data into ascii after it’s brought in from Indigo? I get I’ll probably have to do that repeatedly.


Sent from my iPhone using Tapatalk

Posted on
Mon Aug 13, 2018 1:49 pm
jay (support) offline
Site Admin
User avatar
Posts: 14756
Joined: Mar 19, 2008
Location: Austin, Texas

Re: What is the max length of strings in Indigo variables?

Use json to store the dictionary (assuming that the contents are simple types like strings, integers, etc) in your Indigo variable. That should solve the unicode issues. You can post the exact errors you're seeing and that should tell us for sure.

Indigo stores variable values as unicode, but it's likely there's somewhere else in your process that's attempting to use a str.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Aug 13, 2018 2:03 pm
mundmc offline
Posts: 306
Joined: Sep 14, 2012

Re: What is the max length of strings in Indigo variables?

What if it’s arrays of strings?

Posted on
Mon Aug 13, 2018 2:35 pm
jay (support) offline
Site Admin
User avatar
Posts: 14756
Joined: Mar 19, 2008
Location: Austin, Texas

Re: What is the max length of strings in Indigo variables?

Yep, json has dictionaries and lists. Complex Python objects would be a problem but the basic collection classes are OK.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Aug 13, 2018 2:42 pm
mundmc offline
Posts: 306
Joined: Sep 14, 2012

Re: What is the max length of strings in Indigo variables?

Sweet- reading up on it right now. Many thanks, Jay!


Sent from my iPhone using Tapatalk

Posted on
Tue Aug 14, 2018 7:01 am
mundmc offline
Posts: 306
Joined: Sep 14, 2012

Re: What is the max length of strings in Indigo variables?

I realize I’m getting off topic, made a new entry under the Python sub-forum: Unicode strings and Indigo Variables
https://r.tapatalk.com/shareLink?share_ ... are_type=t


Sent from my iPhone using Tapatalk

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest