i18n.getAvailableLanguages()

On 1 client on start-up we get an error message:
Error Executing script for event: InternalFrameActived on Component: WinLogin.

In the details we see:

The script generating this error is the following:

The error seems to be coming from line 10: Languages = master.i18n.getAvailableLanguages()

I did some further research but did not found any information that could help me further.
At the moment this is only happening on 1 of the 26 vision clients.
And sometimes it just works well on that client...

Someone any idea?

Thanks!

You're right it is coming from line 10 master.il8.ngetAvailableLanguages. Can you show us that function?

Seems like within that you are using urllib3 to connect to some other internet resource to get data and you're getting a timeout. Then your lack of data is trying to be iterated over except because of the timeout it is empty and therefore not iterable in the way you need it to be, hence the out of bounds error. But we can know more if you show us that function.

Hi,

This code is on our Ignition login page, the first page at start-up of an Ignition Client.
I believe it is to detect the available languages within the project and select prior to login.

I do not know where to find that function, is this not something from within Ignition itself?

This will likely be a project function.

1 Like

Functions provided by the Ignition platform all start with system..

2 Likes

Seems to be something related to Deepl translations.
I guess I'll better ask our Integrator to have a look...

Try changing line 37 to

return translations['translations'][0]['text'] if translations['translations'] else None

We'll make it prettier later if the issue comes from there.

Looking at your stack trace again it says line 1 in you rmodule which is your import requests, which internally does an import urrlib3 etc etc. I would get rid of import requests, and rewrite line 34 where you use requests with system.net.httpClient and then do a get requests - check out the documentation here system.net.httpClient - Ignition User Manual 8.1 - Ignition Documentation there is an example of how to do a get request with it.

The error looks internal to the requests package which there is nothing you can really do about (even if there was I wouldn't want to maintain that).

3 Likes