Rocket U2 | UniVerse & UniData

 View Only
  • 1.  UOPY connection resources

    Posted 11-01-2023 16:24

    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 11-01-2023 17:09
    Edited by Mike Rajkowski 11-01-2023 17:10

    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 11-06-2023 10:11

    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 11-10-2023 12:49

    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 11-10-2023 13:56

    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
    ------------------------------



  • 6.  RE: UOPY connection resources

    Posted 2 days ago

    I'm currently in the same boat, I can connect with 1.2 and not 1.3.



    ------------------------------
    Mark Johnson
    Data Engineer
    Rocket Forum Shared Account
    ------------------------------



  • 7.  RE: UOPY connection resources

    ROCKETEER
    Posted yesterday

    The problem is occurring because the SH is not recognizing the 'uv -version' command that was added to check UV version in uopy 1.3. Check the $PATH for UniVerse bin on the Server. Also check startuv.log for what PATH is being recognized by UniVerse unirpcd on the server. A UniVerse restart may be needed for daemon to recognize correct PATH.

    There is an open development ticket to resolve the issue by checking for the database version differently. 

    Hope that helps,



    ------------------------------
    Dave Weinstein
    Associate Technical Support Engineer
    Rocket Internal - All Brands
    ------------------------------