Skip to content

UTF-8 error with Python 3.6 (related with issue #27) #48

@snb2013

Description

@snb2013

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

Originally posted by @snb2013 in #27 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions