Closed adamb032 closed 7 years ago
@adamb032 what's your PyRFA version?
8.2.0
thanks -
How about this http://devcartel.com/blog/14156297
Run below command on your terminal:
$ export PYTHONIOENCODING=utf-8
Or Windows equivalent:
C:\> chcp 65001
It doesn't help. Config:
\Connections\Connection_RSSL1\rsslPort = "14002"
\Connections\Connection_RSSL1\ServerList = "REPLACE_TO_SERVER_NAME"
\Connections\Connection_RSSL1\connectionType = "RSSL"
\Connections\Connection_RSSL1\UserName = "REPLACE_TO_USER_NAME"
\Connections\Connection_RSSL1\Position = "127.0.0.1"
\Connections\Connection_RSSL1\ServiceName = "ELEKTRON_CONNECT"
\Sessions\Session1\connectionList = "Connection_RSSL1"
Example:
import pyrfa
p = pyrfa.Pyrfa()
p.createConfigDb("./pyrfa.cfg")
p.acquireSession("Session1")
p.createOMMConsumer()
p.login()
p.directoryRequest()
p.dictionaryRequest()
print(p.getTimeSeries("USDAM3L1Y="))
I've tried Python3.5 and Python 3.6. Pyrfa version is 8.5.2.
Usage: PYTHONIOENCODING=utf-8 python3.6 timeseries.py
Error:
Traceback (most recent call last):
File "/SOME_ROOT/timeseries.py", line 11, in <module>
print(p.getTimeSeries("USDAM3L1Y="))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 0: unexpected end of data
I just upgraded to python36 and using your binaries i get the following issue doing a basic
p.getTimeSeries(ric) #request
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf7 in position 0: invalid start byte
Please advise.