anuzzolese / pyrml

pyRML is a Python based engine for processing RML files. The RDF Mapping Language (RML) is a mapping language defined to express customized mapping rules from heterogeneous data structures and serializations to the RDF data model. RML is defined as a superset of the W3C-standardized mapping language R2RML, aiming to extend its applicability and broaden its scope, adding support for data in other structured formats.
Apache License 2.0
33 stars 12 forks source link

Install issue #4

Closed macgrs closed 2 years ago

macgrs commented 2 years ago

Hey !

A lightweight rml mapper in python, that ought to be tested šŸ˜ƒ

But, the installation hardly succeed due to what it seems to be recent deprecations of soft_unicode

Issue description

Can't import RMLConverter in fresh new conda 3.10 env

Steps to reproduce the issue

  1. conda create --name pyrml310 python=3.10
  2. conda activate pyrml310
  3. pip install git+https://github.com/anuzzolese/pyrml
  4. in a new py file, :
from pyrml import RMLConverter
import os

# Create an instance of the class RMLConverter.
rml_converter = RMLConverter()

What's the actual result?

Error output :

Traceback (most recent call last):
  File "c:\_Archi\Etudes\21ASTRA_\4b-Database-masonry\0-Essais\rml.py", line 1, in <module>
    from pyrml import RMLConverter
  File "C:\Users\antgr\anaconda3\envs\pyrml310\lib\site-packages\pyrml\__init__.py", line 1, in <module>
    from pyrml.pyrml import *
  File "C:\Users\antgr\anaconda3\envs\pyrml310\lib\site-packages\pyrml\pyrml.py", line 34, in <module>
    from jinja2 import Environment, FileSystemLoader, Template
  File "C:\Users\antgr\anaconda3\envs\pyrml310\lib\site-packages\jinja2\__init__.py", line 12, in <module>
    from .environment import Environment
  File "C:\Users\antgr\anaconda3\envs\pyrml310\lib\site-packages\jinja2\environment.py", line 25, in <module>
    from .defaults import BLOCK_END_STRING
  File "C:\Users\antgr\anaconda3\envs\pyrml310\lib\site-packages\jinja2\defaults.py", line 3, in <module>
    from .filters import FILTERS as DEFAULT_FILTERS  # noqa: F401
  File "C:\Users\antgr\anaconda3\envs\pyrml310\lib\site-packages\jinja2\filters.py", line 13, in <module>
    from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (C:\Users\antgr\anaconda3\envs\pyrml310\lib\site-packages\markupsafe\__init__.py)

Cheers !

macgrs commented 2 years ago

Success with python conda 3.7 and MarkupSafe == 3.0.1. If you are using pip or conda for package managing, you'll have to reinstall the right version.