Eikon Vessel API Bug/Issue: IMO 9782522

When I call Eikon Python API passing the IMO # 9782522, It threw me the following errors.
eikon.eikonError.EikonError: Error code 500 | Backend error. Failed to deserialize backend response. Expected valid JSON. Error: invalid character 'A' looking for beginning of value
API:
df = ek.get_data(imos, assets)
Assets:
['TR.AssetName;TR.AssetExName;TR.AssetStatus;TR.AssetType;TR.AssetSubType;TR.AssetSubSubType;TR.AssetIMO;TR.AssetFlag;TR.AssetDWT;TR.AssetLOA;TR.AssetCubicCapacity;TR.AssetBeam;TR.AssetDraught;TR.AssetHullType;TR.AssetNoTwentyFoot;TR.AssetCoated;TR.AssetRegisteredOwner;TR.AssetManager;TR.AssetSideType;TR.AssetBuilt;TR.AssetBuiltDemolition;TR.AssetIsDeactivated;TR.AssetTPC;TR.GrossTonnage;TR.AssetNetTonnage;TR.AssetFuelType;TR.AssetFuelOil;TR.AssetFuel;TR.AssetBallast;TR.AssetBallastWater;TR.AssetGrain;TR.AssetCargoHolds;TR.AssetLiquidCap;TR.AssetBale;TR.AssetFreshWater;TR.AssetDisplacement;TR.AssetDieselOil;TR.AssetCrudeCapacity;TR.AssetDeckTEU;TR.AssetHoldTEU;TR.AssetPassengers;TR.AssetLubeOil;TR.AssetReeferTEU;TR.AssetCars;TR.AssetCGT;TR.AssetGasOil;TR.AssetClassedBy1;TR.AssetClassedBy1DateChange;TR.AssetClassedBy1Status;TR.AssetClass;TR.AssetSurvey1Date;TR.AssetSurvey1;TR.AssetSurvey1NextDate;TR.AssetPIInsurerDate1;TR.AssetPIInsurer1;TR.AssetSurvey2;TR.AssetClassedBy1Reason;TR.AssetSurvey2Date;TR.AssetClassedBy2;TR.AssetClassedBy2DateChange;TR.AssetClassedBy2Status;TR.AssetSurvey2NextDate;TR.AssetIceClass;TR.AssetPIInsurerDate2;TR.AssetPIInsurer2;TR.AssetClassedBy2Reason;TR.AssetDepth;TR.AssetBreadthMoulded;TR.AssetBreadthExtreme;TR.AssetLengthBP;TR.AssetFreeboardWinter;TR.AssetFreeboardTropical;TR.AssetFreeboardSummer;TR.AssetAirDraught;TR.AssetDepthMoulded;TR.AssetLengthRegistered;TR.AssetBreadthRegistered;TR.AssetBeamExtreme;TR.AssetFreeboardLightship;TR.AssetFreeboardNormalBallast;TR.AssetFreeboardSegregatedBallast;TR.AssetEngTotalKw;TR.AssetMainEngineModel;TR.AssetMainEngineBuilder;TR.AssetMainEngine;TR.AssetEngTotalBhp;TR.AssetMainEngineRpm;TR.AssetMainEngineKw;TR.AssetMainEngineBYear;TR.AssetMainEngineNo;TR.AssetMainEngineBhp;TR.AssetMainEngineShp;TR.AssetMainEnginePower;TR.AssetEngPower;TR.AssetMainEngineType;TR.AssetAuxEngine1;TR.AssetEngineBuilder;TR.AssetAuxEngine1No;TR.AssetAuxEngine1Kw;TR.AssetAuxEngine1Bhp;TR.AssetAuxEngine1Rpm;TR.AssetAuxEngine1BYear;TR.AssetAuxEngine1Shp;TR.AssetBollardPull;TR.AssetPropeller;TR.AssetPropellingType;TR.AssetLiftingEquipment;TR.AssetGenerator;TR.AssetGeneratorDescription;TR.AssetPropellerDescription;TR.AssetPropellerMake;TR.AssetGeneratorMake;TR.AssetGear;TR.AssetThruster;TR.AssetThrusterDescription;TR.AssetTrailers;TR.AssetThrusterMake;TR.AssetJonesAct;TR.AssetDecksNumber;TR.AssetServiceSpeed;TR.AssetPortRegistry;TR.AssetHullMaterial;TR.AssetSpeedConsumpt;TR.AssetFuelConsumption;TR.AssetContractDate;TR.AssetBulkheads;TR.AssetDeliveryDate;TR.AssetNewbuildingNumber;TR.AssetNewbuildingPrice;TR.AssetTrialSpeed;TR.AssetCoatings;TR.AssetManagerAddress;TR.AssetRegisteredOwnerAddress;TR.AssetRegisteredOwnerLocation;TR.AssetManagerLocation;TR.AssetISMManagerName;TR.AssetISMManagerLocation;TR.AssetManagerPhone;TR.AssetManagingAgent;TR.AssetManagingAgentCountry;TR.AssetManagerFax;TR.AssetManagerWebsite;TR.AssetManagerEmail;TR.AssetISMManagerAddress;TR.AssetRegisteredOwnerPhone;TR.AssetISMManagerPhone;TR.AssetManagingAgentPhone;TR.AssetISMManagerFax;TR.AssetRegisteredOwnerFax;TR.AssetManagingAgentFax;TR.AssetManagingAgentAddress;TR.AssetISMManagerWebsite;TR.AssetRegisteredOwnerWebsite;TR.AssetISMManagerEmail;TR.AssetManagingAgentWebsite;TR.AssetRegisteredOwnerEmail;TR.AssetBeneficialOwner;TR.AssetManagingAgentEmail;TR.AssetManagingAgentPost;TR.AssetBeneficialOwnerCountry;TR.AssetManagingOwner;TR.AssetManagingOwnerCountry;TR.AssetManagingOwnerPost;TR.AssetManagingOwnerAddress;TR.AssetGroupOwner;TR.AssetGroupOwnerCountry;TR.AssetManagingOwnerPhone;TR.AssetManagingOwnerFax;TR.AssetManagingOwnerWebsite;TR.AssetManagingOwnerEmail;TR.AssetCommercialManager;TR.AssetCommercialManagerCountry;TR.AssetReeferPts;TR.AssetOperatorName;TR.AssetTechnicalManager;TR.AssetTechnicalManagerCoutry;TR.AssetTechnicalManagerAddress;TR.AssetTechnicalManagerPost;TR.AssetOperatorLocation;TR.AssetOperatorAddress;TR.AssetTechnicalManagerPhone;TR.AssetOperatorPhone;TR.AssetOperatorWebsite;TR.AssetTechnicalManagerFax;TR.AssetOperatorFax;TR.AssetTechnicalManagerWebsite;TR.AssetOperatorEmail;TR.AssetTechnicalManagerEmail;TR.AssetRegister;TR.AssetManagingOwnerMobile;TR.AssetManagingAgentMobile;TR.AssetExName1;TR.AssetExName2;TR.AssetExName3;TR.AssetExName4;TR.AssetExName5;TR.AssetExName6;TR.AssetExName7;TR.AssetExName8;TR.AssetExName9;TR.AssetExName10;TR.AssetBuilder;TR.AssetYardNumber;TR.AssetCountryPlaceBuild;TR.AssetBuilderCountry;TR.AssetShipyard;TR.AssetLocationDate;TR.AssetPolygonZoneType;TR.AssetLocationLatitude;TR.AssetLocationLongitude;TR.AssetDateTime;TR.AssetDestination;TR.AssetDestinationPrevious;TR.AssetDestinationChangeTime;TR.AssetETA;TR.AssetETAPrevious;TR.AssetETAChangeTime;TR.AssetHeading;TR.AssetSpeed;TR.AssetLocationDraught;TR.AssetLocationWidth;TR.AssetLocationLength;TR.AssetLocationStatus;TR.AssetLocationStatusPrevious;TR.AssetLocationStatusChangeTime;TR.AssetCallSign;TR.AssetLocationDatasource;TR.AssetLocationShipType;TR.AssetLocationDraughtPercentage;TR.AssetPolygonDate;TR.AssetPolygonZoneType;TR.AssetPolygonName;TR.AssetCentrePoint;TR.AssetEnterTimestamp;TR.AssetOutTimestamp;TR.AssetRCSID;TR.AssetEventType;TR.AssetEventTypeId;TR.AssetLocationType;TR.AssetFacilityType;TR.AssetFacilityTypeId;TR.AssetLocation;TR.AssetPort;TR.AssetPortRIC;TR.AssetPortEntryTime;TR.AssetDestinationPort;TR.AssetDestinationPortRIC;TR.AssetDestinationCountry;TR.AssetDestinationCountryRCSID;TR.AssetDestinationZone;TR.AssetDestinationZoneRCSID;TR.AssetPreviousPort;TR.AssetPreviousPortRIC;TR.AssetPreviousEntryTime;TR.AssetPreviousExitTime;TR.AssetPreviousPortEntryDraft;TR.AssetPreviousPortExitDraft;TR.AssetBerth;TR.AssetBerthRIC;TR.AssetBerthEntryTime;TR.AssetPreviousBerth;TR.AssetPreviousBerthRIC;TR.AssetPreviousBerthEntryTime;TR.AssetPreviousBerthExitTime;TR.AssetPreviousBerthType;TR.AssetAnchorage;TR.AssetAnchorageRIC;TR.AssetAnchorageEntryTime;TR.AssetPreviousAnchorage;TR.AssetPreviousAnchorageRIC;TR.AssetPreviousAnchorageEntryTime;TR.AssetPreviousAnchorageExitTime;TR.AssetPreviousZone;TR.AssetPreviousZoneRCSID;TR.AssetPreviousCountry;TR.AssetPreviousCountryRCSID;TR.AssetCleanDirty;TR.AssetCleanDirtyAssessmentDate;TR.AssetCleanDirtySource;TR.AssetFlowLocationDate;TR.AssetFlowPermID;TR.AssetFlowRIC;TR.AssetLoadingPort;TR.AssetLoadingGeography;TR.AssetLoadingDateFrom;TR.AssetLoadingDateTo;TR.AssetLoadingGeographyForecastActual;TR.AssetLoadingDateForecastActual;TR.AssetDischargingPort;TR.AssetDischargingGeography;TR.AssetDischargingGeographyForecastActual;TR.AssetDischargingDateForecastActual;TR.AssetDepartureDate;TR.AssetDepartureDateForecastActual;TR.AssetDepartureEstimateType;TR.AssetArrivalDateFrom;TR.AssetArrivalDateTo;TR.AssetArrivalDateForecastActual;TR.AssetArrivalEstimateType;TR.AssetDischargeDate;TR.AssetFlowCommodity;TR.AssetFlowCommodityRCSCode;TR.AssetFlowGrade;TR.AssetGradeAF;TR.AssetCharterer;TR.AssetFreight;TR.AssetFreightType;TR.AssetVolume;TR.AssetVolumeMeasurement;TR.AssetFlowStatus;TR.AssetFlowComments;TR.AssetFlowTradeComments;TR.AssetTradeType;TR.AssetPriceDiscountPremium;TR.AssetPriceLow;TR.AssetPriceHigh;TR.AssetPriceMeasurement;TR.AssetPriceBasis;TR.AssetTerms;TR.AssetBenchmark;TR.AssetBuyer;TR.AssetSeller;TR.AssetIssuer;TR.AssetIssuerBuySell;TR.AssetAwardee;TR.AssetTradingDate;TR.AssetClosingDate']
Best Answer
-
Hi @ZShi
I could not find your registered email(xxxx@freexxxxx.com) on the Eikon Account.
I tested the API call and found that the issue is with "TR.AssetFlowComments" as Jason's answer.
However, it also affects Eikon Excel as well and this needs to be addressed by Refinitiv Helpdesk.
So, please visit https://my.refinitiv.com
And report the issue to Refinitiv Helpdesk using Eikon user (I could not do this on your behalf's because I could not find your registered email in Eikon Account)
0
Answers
-
@ZShi You need to make an array of fields as such:
assets = ['field1','field2','field3']
not in the format you have put them as one string with field names separated by a semi-colon. Please see our API reference guide which may be of use. On the same link please also check the API limits document as there are limits enforced per API call. I hope this can help.
0 -
You were wrong.
Use same API, all our other 400+ IMOs returned correct results. This is the only one with issue.
BTW, by the array like input as you suggested, I got this error
ValueError: get_data error: the fields should be of type string or dictionary
Here is the example in Eikon API document
#Pass IMO Number as the first argument to the function get_data to get the location details of any vessel
#In this example, we're passing IMO Number 9640176 as our vessel identifier
#You may replace that with an IMO of your choice
df = ek.get_data(["9640176"],["TR.AssetName;TR.AssetImo;TR.AssetLocationLatitude;TR.AssetLocationLongitude"])You can see the assets are separated by semi colon.
From my experience, it seems one of the "asset" text value contains the Special character that is JSON reserved. My suggestion is:
1) You break the assets into small sets and try figure out which "asset" exactly caused the issue;
2) Go to your database, check what was the text value and what character caused the issue; and
3) Put a small fix in the code to handle this special character.
Thanks
0 -
@ZShi Apols I stand corrected - hadn't seen that semi-colon format used before. The field that is causing the error is TR.AssetFlowComments. All others seem fine. This comment field must be free text and contains:
I will have to pass this onto the dev team to look at and get back to you. Thanks for your suggestions.
This format shouldn't error though:
fields = ['TR.AssetName','TR.AssetImo','TR.AssetLocationLatitude','TR.AssetLocationLongitude']
df,err = ek.get_data(["9640176"],fields) df0 -
Glad you guys found the issue! Wondering for a quick solution (instead of waiting the code release etc), could you guys simply fixed the data ( "TR.AssetFlowComments") of that IMO#.
This way, the API should at least return the valid output instead of error out.
Let me know, my email as zshi@freepoint.com
0 -
Hi @ZShi
Please submit a ticket to support using the Eikon account user at https://my.refinitiv.com
So the technical support group will reach out to you regarding any fix/solution.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 652 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛