sassoftware / python-sasctl

Python package and CLI for user-friendly integration with SAS Viya
https://sassoftware.github.io/python-sasctl
Apache License 2.0
45 stars 40 forks source link

ASTORE model registration error #149

Open pkaczynski opened 1 year ago

pkaczynski commented 1 year ago

Describe the issue Model created using swat package gives error during registration

To Reproduce Create model using gbTreeTrain and register it using register_model

Expected behavior Model should be registered in Model Manager

Stack Trace

with Session('viya-gke.0x1fff.com', verify_ssl=False, protocol='http'):
    model = register_model(astore, 'CAS_HMEQ_GBTREE', 'OSA Demo', force=True, version='latest')
/opt/conda/lib/python3.10/site-packages/urllib3/connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host 'viya-gke.0x1fff.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(
NOTE: Added action set 'astore'.
NOTE: 1043772 bytes were downloaded from the table "HMEQ_ASTORE" in the caslib "CASUSER(user1)".
/opt/conda/lib/python3.10/site-packages/urllib3/connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host 'viya-gke.0x1fff.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(
Unexpected exception formatting exception. Falling back to standard exception
Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3433, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "/tmp/ipykernel_453/2571497720.py", line 2, in <module>
    model = register_model(astore, 'CAS_HMEQ_GBTREE', 'OSA Demo', force=True, version='latest')
  File "/opt/conda/lib/python3.10/site-packages/sasctl/tasks.py", line 382, in register_model
    model = mr.post(
  File "/opt/conda/lib/python3.10/site-packages/sasctl/_services/service.py", line 113, in post
    return cls.request("post", *args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/sasctl/_services/service.py", line 93, in request
    return core.request(verb, path, session, format_, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/sasctl/core.py", line 2034, in request
    raise HTTPError(
urllib.error.HTTPError: HTTP Error 503: {"errorCode":0,"message":" ERROR: OpenSSL error 337047686 (0x1416f086) occurred in SSL_connect/accept at line 4978, the error message is \"error:1416F086:SSL ","details":["traceId: a8053a61b28700ee","path: /modelRepository/models"],"links":[],"version":2,"httpStatusCode":503}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 2049, in showtraceback
    if hasattr(value, "_render_traceback_"):
  File "/opt/conda/lib/python3.10/tempfile.py", line 477, in __getattr__
    file = self.__dict__['file']
KeyError: 'file'

Version 1.8.1

smlindauer commented 1 year ago

Is this to Viya 4 or Viya 3.5?

From the error this looks like the modelRepository service on the target server is not actually available (SSL 503). Are you sure that the server was working properly at the time of registration?

smlindauer commented 1 year ago

@pkaczynski,

Was this issue ever fixed or is there more information I could look at to help find a resolution?