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'

Best Answer

  • @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"
                }
            }
        },
    ...
    }