question

Upvotes
Accepted
1 0 0 2

Vessels going through China eikon API Python

Hi,


I tried to use the code below to get the vessels that go through china but I get the following error AttributeError: 'NoneType' object has no attribute '_get_endpoint_config'


This is my code below

import refinitiv.dataplatform as rdp

#from refinitiv.data.content import search

df = rdp.search(

view = rdp.SearchViews.VesselPhysicalAssets,

filter = "AssetLocation eq 'China'",

select = "DocumentTitle, RIC, OriginPort, DestinationPort, IMO, AssetLocation"

)


I also used the examples in this data library https://github.com/Refinitiv-API-Samples/Example.DataLibrary.Python/blob/main/Examples/2-Content/2.06-Search/EX-2.06.01-Search.ipynb

and they all returned the same error as above AttributeError: 'NoneType' object has no attribute '_get_endpoint_config'

eikon-data-apiapipython apivessel
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
83.1k 281 53 77

@BSeed

Thanks for reaching out to us.

I tested with the Refinitiv Data Library for Python.

response = search.Definition(
        view=search.Views.VESSEL_PHYSICAL_ASSETS,    
        filter = "LocationDestination eq 'China'",
        select = "DocumentTitle, RIC, OriginPort, DestinationPort, IMO, LocationDestination"
    ).get_data()
response.data.df 

The output is:

1664258502069.png

Please verify the version of the Refinitiv Data library that you are using. The latest version is refinitiv-data 1.0.0b22.

Then, check the refinitiv-data.config.json configuration file used by the application.

You can enable the debug log in the library.

{
...
    "logs": {
        "level": "debug",
        "transports": {
            "console": {
                "enabled": true
            },
            "file": {
                "enabled": true,
                "name": "refinitiv-data-lib.log"
            }
        }
    },
...
}

1664258502069.png (85.7 KiB)
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.