Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Importing RMLConverter #6

Open
shakeel26 opened this issue Oct 11, 2022 · 7 comments
Open

Error in Importing RMLConverter #6

shakeel26 opened this issue Oct 11, 2022 · 7 comments

Comments

@shakeel26
Copy link

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 ?

@anuzzolese
Copy link
Owner

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

@shakeel26
Copy link
Author

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

@anuzzolese
Copy link
Owner

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

@shakeel26
Copy link
Author

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.

@anuzzolese
Copy link
Owner

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

@shakeel26
Copy link
Author

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

anuzzolese added a commit that referenced this issue Oct 17, 2022
Remove str.decode('utf-8') as we already have unicode strings.

Fix issue #6
@anuzzolese
Copy link
Owner

anuzzolese commented Oct 17, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants