question

Upvotes
Accepted
2 4 7 13

Python API refinitiv-data

When I import the package "refinitiv-data", I get the following error message:


import refinitiv.data as rd

File "C:\Users\ninno\AppData\Roaming\Python\Python311\site-packages\refinitiv\data\__init__.py", line 35, in <module>

from . import delivery, session, content, errors, eikon, usage_collection, discovery

File "C:\Users\ninno\AppData\Roaming\Python\Python311\site-packages\refinitiv\data\discovery\__init__.py", line 17, in <module>

from ._search_templates import templates as search_templates

File "C:\Users\ninno\AppData\Roaming\Python\Python311\site-packages\refinitiv\data\discovery\_search_templates\__init__.py", line 8, in <module>

from refinitiv.data.discovery._search_templates.manage import SearchTemplates

File "C:\Users\ninno\AppData\Roaming\Python\Python311\site-packages\refinitiv\data\discovery\_search_templates\manage.py", line 125, in <module>

class SearchTemplates(UserNamespace):

File "C:\Users\ninno\AppData\Roaming\Python\Python311\site-packages\refinitiv\data\discovery\_search_templates\manage.py", line 139, in SearchTemplates

RICCategory = RICCategoryTemplate()

^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\ninno\AppData\Roaming\Python\Python311\site-packages\refinitiv\data\discovery\_search_templates\embedded.py", line 18, in __init__

super().__init__(

File "C:\Users\ninno\AppData\Roaming\Python\Python311\site-packages\refinitiv\data\discovery\_search_templates\base.py", line 211, in __init__

if template.placeholders():

^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\ninno\AppData\Roaming\Python\Python311\site-packages\refinitiv\data\_tools\templates.py", line 63, in placeholders

return self.get_vars_from_node(self._parsed)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\ninno\AppData\Roaming\Python\Python311\site-packages\jinja2\nodes.py", line 245, in __hash__

return hash(tuple(self.iter_fields()))

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

TypeError: unhashable type: 'list'

refinitiv-dataplatform-eikon#technologypython api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvotes
Accepted
80.3k 259 52 75

@nicola.fiore

Thank you for reaching out to us.

Please check the version of jinja2 package installed on the Python environment.

The Refintiiv Data Library requires jinja2<4.0.0,>=3.0.3.

I assume that you are uring jinja2 3.0.2 or below.

C:\>pip show jinja2
Name: Jinja2
Version: 3.0.3
Summary: A very fast and expressive template engine.
Home-page: https://palletsprojects.com/p/jinja/
Author: Armin Ronacher
Author-email: armin.ronacher@active-4.com
License: BSD-3-Clause
Location: c:\python37\lib\site-packages
Requires: MarkupSafe
Required-by: altair, bokeh, mpld3, nbconvert, notebook, refinitiv-data
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.