Rocket U2 | UniVerse & UniData

 View Only
  • 1.  UOPY connection resources

    Posted 27 days ago

    Hello,

      I'm freshly exposed to UniVerse and would like connect to an instance running on my network (using UOPY).  Looking though the online API Documentation at uopy,  I am unable to find details on the parameters for the MV configuration (uopy.config) . The documentation assumes familiarity with UniVerse and its typical settings. Is there a document that covers configuration of connections over the network?  I continue to receive general error when connecting:

    ...ckages\Python311\site-packages\uopy\_session.py", line 319, in connect     raise UOError(ErrorCodes.UOE_UNKNOWN_ERROR)  uopy._uoerror.UOError: Error [-1] : Unexpected Error

    Any help would be appreciated.

    Thanks

    -Roberto



    ------------------------------
    Roberto
    Developer
    Rocket Forum Shared Account
    ------------------------------


  • 2.  RE: UOPY connection resources

    ROCKETEER
    Posted 27 days ago
    Edited by Mike Rajkowski 27 days ago

    Roberto,

    The following is a simple method I use to make the connection:

    import uopy
    import getpass
    user = input("Enter user name? ")
    passwd = getpass.getpass("Enter Password? ")

    def makeconnection(user, password):
        config = {
                 'user': user,
                 'password': passwd,
                 'service': 'uvcs',
                 'host':    'localhost',
                 'account': 'XDEMO',
                 'encoding': 'GB18030',
             }
        try:
            status = 0
            thissession = uopy.connect(**config)
        except uopy.UOError as e:
            print(str(e.code))
            status = e.code
            thissession = "not connected"
        return status, thissession


    status, session = makeconnection(user, passwd)
    print(str(session))
    The host  name would be that system that has UniVerse running on it.  You will need to provide you username and password for the system. 
    Note that I hard coded this for the XDEMO account, if your site has removed this account, you will have to change it to an account that you have access to.  Also, you should check with your System Administrator and/or UniVerse DBA to see if they may have blocked access.



    ------------------------------
    Mike Rajkowski
    MultiValue Product Evangelist
    Rocket Internal - All Brands
    US
    ------------------------------



  • 3.  RE: UOPY connection resources

    Posted 22 days ago

    I had the same problem:

    but when I installed versio 1.2 the problem was solved:

    Hope that helps



    ------------------------------
    Bart Moortgat
    Comperex Belgium NV/SA
    Dilbeek BE
    ------------------------------



  • 4.  RE: UOPY connection resources

    Posted 18 days ago

    Hi Bart,

      Thanks for your response, after changing to that version, I did successfully connect. Also, after inspecting the error logs, I can see that the my specific error is related to path/env config.  Were you having similar error messages?

    Perhaps the Rocket team can offer insight as to why this is an error in the latest version

    Thanks Again!

    -Roberto 



    ------------------------------
    Roberto Cannella
    Developer
    Rocket Forum Shared Account
    ------------------------------



  • 5.  RE: UOPY connection resources

    ROCKETEER
    Posted 18 days ago

    Roberto,

    This is strange, I am not having a problem with uopy 1.3.0 on Python 3.9.12, connecting to UniVerse 11.4.1, and can not reproduce the issue.

    If you can open a support ticket, and send in the code you you used to to connect, along with the complete log, we may be able to determine what happened.

    If you happen to have a uopy.ini file, please send that as well.



    ------------------------------
    Mike Rajkowski
    MultiValue Product Evangelist
    Rocket Internal - All Brands
    US
    ------------------------------