Rocket U2 | UniVerse & UniData

 View Only

 python uopy

Shafeek Naidoo's profile image
Shafeek Naidoo posted 01-11-2022 09:33
Hi all
First time posting...

Im connecting successfully to universe, using uopy.connect.
 
with the session i can run a command on the server, however every subsequent call to the server calling cmd.run() (please see below) results in the following error:

UOError: Error [39207] : Error occurred on server. Possible client-side licensing failure.

Note: this only happens  the second time, also calling uopy.connect takes an awfully long time to return, is this normal?

My code:
session = uopy.connect(**config)
cmd = uopy.Command(cpmmandtext)
cmd.run()
print(cmd.response)​
Shafeek Naidoo's profile image
Shafeek Naidoo
Update to the above, I call uopy.conect only once
Mike Rajkowski's profile image
ROCKETEER Mike Rajkowski
Shafeek,

I reproduced the Error:

UOError: Error [39207] : Error occurred on server.  Possible client-side licensing failure.

In my test all I did was execute the "LO" command. The first time I run it I get the error you see 

First run of test_comand("LO")

error in command Error [39207] : Error occurred on server. Possible client-side licensing failure.
2nd run of test_command("LO") error in command Error [81009] : The RPC failed

Note that the following is method I created to quickly test:
def test_command(command):
    try:
        the_command = uopy.Command(command)
        the_command.run()
        print("command complete.")
    except uopy.UOError as e:
        print("error in command")
        print(str(e))
    print(the_command.response)

---

What is the command you are executing, and is there something in it that would cause it to STOP, LO or Abort?
Shafeek Naidoo's profile image
Shafeek Naidoo
Hi,  I was running a LIST command
Regards
Mike Rajkowski's profile image
ROCKETEER Mike Rajkowski
Note that if you are having a problem running a LIST statement twice, then check the what the LIST is doing.  

For example, if it is calling a subroutine, and that routine aborts you will have issues with the UO connection.

If you are still having an issue in isolating the issue, contact your Rocket Support Provider.

Mike Rajkowski
Shafeek Naidoo's profile image
Shafeek Naidoo

Ive mananged to resolve this, 
I needed to activate the encryption key on universe first. and make sure I use:

with session.connect...
with every request