Error when setting App key

Hi everyone,
I used to be able to run scripts without errors, but lately have an issue with setting the app key. In particular I get the following error logging message:
2020-04-29 18:10:05,511 P[76044] [MainThread 76048] Response : 500 - {"code":500,"message":"Cannot find module \".\"","statusMessage":"Internal Server Error"}
2020-04-29 18:10:05,512 P[76044] [MainThread 76048] Port 9000 was retrieved from .portInUse file
2020-04-29 18:10:05,513 P[76044] [MainThread 76048] Try to handshake on url http://localhost:9000/api/handshake...
2020-04-29 18:10:05,517 P[76044] [MainThread 76048] Response : 400 - Handshake payload is invalid.
2020-04-29 18:10:05,518 P[76044] [MainThread 76048] Set Proxy port number to 9000
The according error message is:
return super(DesktopSession, self).close()
TypeError: super(type, obj): obj must be an instance or subtype of type
My Eikon app is open and I did not change any of my python environments since last my last use. I am using eikon 1.1.2.
Thanks in advance for your answer!
Best Answer
-
Hi Adrien,
Your code is very simple. It seems that you're facing to a very specific case that I can't explain. It could be caused by a mismatch in your Python environment with eikon versions. I also noted that your Eikon version isn't recent : 4.0.49 (versus 4.0.51)
I suggest to test with refinitiv-dataplatform library.
It should replace eikon in next months and is available as alpha version on pypi: https://pypi.org/project/refinitiv-dataplatform/You'll just have to update your code :
import eikon as ek
import logging.config
ek.set_log_level(logging.DEBUG)
ek.set_app_key(XXXXXXX)to
import refinitiv.dataplatform as ek
import logging.config
ek.set_app_key(XXXXXXX) ek.get_default_session().set_log_level(5)Notes that as this library is not released, few changes could be done in next versions, but eikon legacy functions you're using are maintened.
0
Answers
-
Hi @adrien.weihs,
As a quick test, can you restart Eikon?
There have been similar reports in the past:
https://community.developers.refinitiv.com/questions/50003/500-internal-server-error-1.html
I would encourage you to search the forums for similar issues/resolutions.
0 -
Dear Nick,
It goes without saying that I have tried (several) times to restart my eikon application. I am a bit surprise that you "encourage me to look for other solutions", when In particular, if I am not mistaken, the links you provided me with, do not describe a way of solving the problem but only refer to checking the alerts tab.
Adrien
0 -
Hi @adrien.weihs,
Unfortunately the server 500 error is nonsensical. The suggestion to look for Alerts may have explained some issues in the backend causing this unexpected behaviour you are seeing. I’m assuming you are completely shut out. Can you send me your appkey? If you haven’t already, can you generate a new appkey and try that? I will continue my investigation. Thanks for your patience.
0 -
Hi @adrien.weihs,
I have opened up a support ticket. Can you provide the version of Eikon you are using? I know you have had success with your current version of Eikon but the recommendation was to ensure you have at least version 4.0.36.
0 -
Hi
Following error messages arn't critical:
2020-04-29 18:10:05,511 P[76044] [MainThread 76048] Response : 500 - {"code":500,"message":"Cannot find module \".\"","statusMessage":"Internal Server Error"}
2020-04-29 18:10:05,512 P[76044] [MainThread 76048] Port 9000 was retrieved from .portInUse file
2020-04-29 18:10:05,513 P[76044] [MainThread 76048] Try to handshake on url http://localhost:9000/api/handshake...
2020-04-29 18:10:05,517 P[76044] [MainThread 76048] Response : 400 - Handshake payload is invalid.It's related to different connection attempts to the Eikon proxy for backward compatibility with all proxy versions.
What is important is to have the message:
2020-04-29 18:10:05,518 P[76044] [MainThread 76048] Set Proxy port number to 9000
That means the connection is successful.
In a second step, you have this exception :
return super(DesktopSession, self).close()
TypeError: super(type, obj): obj must be an instance or subtype of typeI understand it's reproduced all times.
Could you activate logs before the call to set_app_key and share the log (without user info like app_key) ?
(add ek.set_log_level(5) to have all levels)0 -
Hi Pierre,
Thank you for coming back to me and the explanation of the backward compatibility procedure.
Indeed, the exception is reproduced at all times. I have now followed your advice and activated the log with the extra log_level command (before the app key step) and get exactly the same log (and exception as above):
2020-05-04 08:37:54,663 P[76044] [MainThread 76048] Set App Key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2020-05-04 08:37:54,670 P[76044] [MainThread 76048] Response : 500 - {"code":500,"message":"Cannot find module \".\"","statusMessage":"Internal Server Error"}
2020-05-04 08:37:54,671 P[76044] [MainThread 76048] Port 9000 was retrieved from .portInUse file
2020-05-04 08:37:54,673 P[76044] [MainThread 76048] Try to handshake on url http://localhost:9000/api/handshake...
2020-05-04 08:37:54,677 P[76044] [MainThread 76048] Response : 400 - Handshake payload is invalid.
2020-05-04 08:37:54,679 P[76044] [MainThread 76048] Set Proxy port number to 9000
Do you have any other suggestions?
Adrien
0 -
Hi Adrien,
Unfortunately, logs won't be useful in your case because the connection looks like successful.
Could you share the code that leads to the following exception ?
return super(DesktopSession, self).close()
TypeError: super(type, obj): obj must be an instance or subtype of typeIn addition, could you check DESKTOPSXSSVC and PROXY versions in the Eikon \ Help \ About Thomson Reuters window ?
0 -
Hi Pierre,
This is also what I suspected regarding the logs.
The code I am using is quite straight-forward really:
import eikon as ek
import logging.config
ek.set_log_level(logging.DEBUG)
ek.set_log_level(5)
ek.set_app_key(XXXXXXXXXXXXXXXXXXXXXX)
Please find my Eikon version attached as well.
Adrien
0 -
Hi Nick,
Thank you for coming back to me and opening a ticket. I have also tried to use a new App key, which unfortunately did not work. Is there a secure way to send you my app key? What do you mean when saying "completely shut out"? Is that something I would need to discuss with the sales representative?
Also, I believe that I have Eikon 4.0.52.
Adrien
0
Categories
- All Categories
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 613 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
- 248 ETA
- 552 WebSocket API
- 37 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
- 630 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
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 86 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛