opcua-client-gui icon indicating copy to clipboard operation
opcua-client-gui copied to clipboard

CertProperties.path is of NoneType

Open bluppfisk opened this issue 2 years ago • 2 comments

I select Basic256, SignAndEncrypt, and paths to a certificate and a private key file. When clicking connect, I get:

  File "/home/redacted/.local/lib/python3.10/site-packages/asyncua/crypto/uacrypto.py", line 26, in load_certificate
    _, ext = os.path.splitext(path)
  File "/usr/lib/python3.10/posixpath.py", line 118, in splitext
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType
uaclient.mainwindow - WARNING - showing error: %s')

Seems to make sense to me because load_certificate is done with CertProperties which is a dataclass, but constructed from the security string it never gets assigned its path attribute.

bluppfisk avatar May 18 '22 17:05 bluppfisk

I have the same problem - found a workaround yet, @bluppfisk?

DominikRoB avatar Jul 12 '22 16:07 DominikRoB

I ended up writing a Python script to do what I needed to do which was really just discovering the structure and pulling some data.

bluppfisk avatar Jul 14 '22 08:07 bluppfisk