pyrml icon indicating copy to clipboard operation
pyrml copied to clipboard

Error in Importing RMLConverter

Open shakeel26 opened this issue 3 years ago • 7 comments

There is error in import due to which its not possible to run anything.

Traceback (most recent call last):
  File "converter.py", line 2, in <module>
    from pyrml import RMLConverter
  File "/pyrml/pyrml/__init__.py", line 1, in <module>
    from pyrml.pyrml import *
  File "/pyrml/pyrml/pyrml.py", line 52
    def __init__(self, map_id: URIRef = None):
                             ^
SyntaxError: invalid syntax

Can you explain, how to fix ?

shakeel26 avatar Oct 11 '22 19:10 shakeel26

Which version of Python you are using? pyRML requires Python 3.x. It seems you are using Python 2.x

anuzzolese avatar Oct 14 '22 10:10 anuzzolese

Thanks for reply, I am using 3.7 , 2.x is too old,

shakeel26 avatar Oct 14 '22 10:10 shakeel26

How do you run the software? What are the steps you do?

anuzzolese avatar Oct 14 '22 13:10 anuzzolese

I have followed the readme instructions:

1 - Clone repo 2 - then installed pip install . within repo => it was success 3 - Tried example => python converter.py -o artists_places.ttl -f turtle examples/artists/artist-map.ttl

At the step 3 it was failed.

4 - Then I tried API method also had issue of Import RMLConverter .

5 - I have tried with my own RML but also same errors of course.

shakeel26 avatar Oct 14 '22 15:10 shakeel26

If you type on terminal python -v what you have back?

anuzzolese avatar Oct 14 '22 16:10 anuzzolese

Python 3.8.0 Now I tried again the following command python converter.py -o artists_places.ttl -f turtle examples/artists/artist-map.ttl Now the error is different and you can see in attachment. Screenshot from 2022-10-14 18-57-16

shakeel26 avatar Oct 14 '22 16:10 shakeel26

The latest issue you are reporting should be fixed by commit 978e224 I have just posted. Let me know if it works. Of course you need to sync your local repo in order to fetch the changes.

anuzzolese avatar Oct 17 '22 06:10 anuzzolese