question

Upvotes
Accepted
5 6 6 8

Unable to import DatastreamDSWS

Traceback (most recent call last):

File "getPythonData.py", line 13, in <module>

import DatastreamDSWS as dsws

File "/home/ubuntu/.local/lib/python3.5/site-packages/DatastreamDSWS/__init__.py", line 11, in <module>

from .DS_Response import Datastream

File "/home/ubuntu/.local/lib/python3.5/site-packages/DatastreamDSWS/DS_Response.py", line 9, in <module>

import pandas as pd

File "/home/ubuntu/.local/lib/python3.5/site-packages/pandas/__init__.py", line 55, in <module>

from pandas.core.api import (

File "/home/ubuntu/.local/lib/python3.5/site-packages/pandas/core/api.py", line 5, in <module>

from pandas.core.arrays.integer import (

File "/home/ubuntu/.local/lib/python3.5/site-packages/pandas/core/arrays/__init__.py", line 1, in <module>

from .array_ import array # noqa: F401

File "/home/ubuntu/.local/lib/python3.5/site-packages/pandas/core/arrays/array_.py", line 7, in <module>

from pandas.core.dtypes.common import (

File "/home/ubuntu/.local/lib/python3.5/site-packages/pandas/core/dtypes/common.py", line 11, in <module>

from pandas.core.dtypes.dtypes import (

File "/home/ubuntu/.local/lib/python3.5/site-packages/pandas/core/dtypes/dtypes.py", line 53, in <module>

class Registry:

File "/home/ubuntu/.local/lib/python3.5/site-packages/pandas/core/dtypes/dtypes.py", line 84, in Registry

self, dtype: Union[Type[ExtensionDtype], str]

File "/usr/lib/python3.5/typing.py", line 552, in __getitem__

dict(self.__dict__), parameters, _root=True)

File "/usr/lib/python3.5/typing.py", line 512, in __new__

for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):

File "/usr/lib/python3.5/typing.py", line 512, in <genexpr>

for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):

File "/usr/lib/python3.5/typing.py", line 1077, in __subclasscheck__

if super().__subclasscheck__(cls):

File "/usr/lib/python3.5/abc.py", line 225, in __subclasscheck__

for scls in cls.__subclasses__():

TypeError: descriptor '__subclasses__' of 'type' object needs an argument



datastream-apidsws-api
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.

Hello @abbanerjee

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If so please can you click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question.

Thanks,


AHS


Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvote
Accepted
24.7k 54 17 14

Hello @abbanerjee

Based a the given stack trace, I assume that you are using Python version 3.5.x.

Please note that DatastreamDSWS for Python supports Python version 3.6 and above. (see "Requirement" section in Getting Start with Python document). I suggest you upgrade the Python version that run Datastream application.

I can replicate the same kind of error messages with Python 3.5.6. If I change to newer version, I did not encounter the problem.

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.