Select to view content in your preferred language

User Imput Console

821
4
09-06-2022 08:03 AM
Andres
by
Emerging Contributor

Hello.

I have a script that does some operations and then creates a report to be sent.

This script works with OAuth, at any time I need to renew the access token through authorization code.

I can't get python input to work in the console.

Any ideas on how to fix this?

0 Kudos
4 Replies
RPGIS
by
Frequent Contributor

Hi @Andres,

Can you post a snippet of your script where you think problems are occurring? It would be difficult to help you if nobody can see where the issue lies.

0 Kudos
Andres
by
Emerging Contributor

AuthorizationAcquire() is a function of a class, which generates an access request, to obtain an access token and a refresh token, for the first time.

This function contains this line:
response = self.tokenaccess(input('AUTHENTICATION CODE: '))

The problem occurs in: input('AUTHENTICATION CODE: ')
The error returned is: RuntimeError: input(): lost sys.stdin

0 Kudos
Andres
by
Emerging Contributor

I found a working alternative to sys.input.

Thanks anyway

0 Kudos
BenjaminBlackshear
Regular Contributor

can you share the alternative you used? i am running into the same issue

0 Kudos