question

Upvotes
Accepted
1 0 0 0

DatastreamDSWS cannot retrieve token on Windows server 2016

I am running a Python application from a batch file on a Windows Server 2016 machine.

The Python application connects with the correct username and password in this format:

ds = dsws.Datastream(username, password)

However the applciation persistently fails to connect, showing this error:

_get_token : Exception Occured

(<class 'ModuleNotFoundError'>, ModuleNotFoundError("No module named 'wincertstore'"), <traceback object at 0x0000020C14A1DE00>)

Can you assist?

datastreamrequest-token
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvotes
Accepted
80k 257 52 75

@richard.ali

On Windows, the DatastreamDSWS library depends on the wincertstore package. You can verify the source code here.

    def _loadWinCerts(self):
        import wincertstore
        cfile = wincertstore.CertFile()
        cfile.addstore('CA')
        cfile.addstore('ROOT')
        cfile.addstore('MY')
        self.certfile = cfile.name
        atexit.register(cfile.close)
        #print(self.certfile.name)

Please install the wincertstore package by using the following command.

pip install wincertstore 


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.