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 when cow_tool convert in Windows OS #126

Open
carlosug opened this issue Apr 12, 2022 · 0 comments
Open

Error when cow_tool convert in Windows OS #126

carlosug opened this issue Apr 12, 2022 · 0 comments

Comments

@carlosug
Copy link

Hi community!

I got an error [1] using Windows OS running cow_tool convert. My file directory data has:

  • tableGames.csv
  • tableGames.csv-metadata.json

I then do:

cow_tool convert data\tableGames.csv

Expected result is a ttl file; instead I got the following error:
[1]:

Converting .\data\rulesetPeriods.csv to RDF
Initializing converter for .\data\rulesetPeriods.csv
Processes: 4
Chunksize: 5000
Something went wrong, skipping .\data\rulesetPeriods.csv.
Traceback (most recent call last):
  File "C:\Users\P70069673\Documents\projects\play-fair-no-git\play-fair\lib\site-packages\cow_csvw\csvw_tool.py", line 
55, in __init__
    c = CSVWConverter(source_file, delimiter=delimiter,
  File "C:\Users\P70069673\Documents\projects\play-fair-no-git\play-fair\lib\site-packages\cow_csvw\converter\csvw.py", 
line 223, in __init__
    self.metadata_graph.load(f, format='json-ld')
  File "C:\Users\P70069673\Documents\projects\play-fair-no-git\play-fair\lib\site-packages\rdflib\graph.py", line 1274, 
in load
    return self.parse(source, publicID, format)
  File "C:\Users\P70069673\Documents\projects\play-fair-no-git\play-fair\lib\site-packages\rdflib\graph.py", line 1252, 
in parse
    parser.parse(source, self, **args)
  File "C:\Users\P70069673\Documents\projects\play-fair-no-git\play-fair\lib\site-packages\rdflib\plugins\parsers\jsonld.py", line 125, in parse
    to_rdf(data, conj_sink, base, context_data, version, generalized_rdf)
  File "C:\Users\P70069673\Documents\projects\play-fair-no-git\play-fair\lib\site-packages\rdflib\plugins\parsers\jsonld.py", line 144, in to_rdf
    return parser.parse(data, context, dataset)
  File "C:\Users\P70069673\Documents\projects\play-fair-no-git\play-fair\lib\site-packages\rdflib\plugins\parsers\jsonld.py", line 164, in parse
    context.load(local_context, context.base)
  File "C:\Users\P70069673\Documents\projects\play-fair-no-git\play-fair\lib\site-packages\rdflib\plugins\shared\jsonld\context.py", line 353, in load
    self._prep_sources(base, source, sources, referenced_contexts)
  File "C:\Users\P70069673\Documents\projects\play-fair-no-git\play-fair\lib\site-packages\rdflib\plugins\shared\jsonld\context.py", line 377, in _prep_sources
    new_ctx = self._fetch_context(
  File "C:\Users\P70069673\Documents\projects\play-fair-no-git\play-fair\lib\site-packages\rdflib\plugins\shared\jsonld\context.py", line 409, in _fetch_context
    source = source_to_json(source_url)
  File "C:\Users\P70069673\Documents\projects\play-fair-no-git\play-fair\lib\site-packages\rdflib\plugins\shared\jsonld\util.py", line 27, in source_to_json
    source = create_input_source(source, format="json-ld")
  File "C:\Users\P70069673\Documents\projects\play-fair-no-git\play-fair\lib\site-packages\rdflib\parser.py", line 281, 
in create_input_source
    ) = _create_input_source_from_location(
  File "C:\Users\P70069673\Documents\projects\play-fair-no-git\play-fair\lib\site-packages\rdflib\parser.py", line 312, 
in _create_input_source_from_location
    if path.exists():
  File "C:\users\p70069673\appdata\local\programs\python\python39\lib\pathlib.py", line 1407, in exists
    self.stat()
  File "C:\users\p70069673\appdata\local\programs\python\python39\lib\pathlib.py", line 1221, in stat
    return self._accessor.stat(self)
OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'https:\\raw.githubusercontent.com\\CLARIAH\\COW\\master\\csvw.json'

You can get the files here: https://github.com/MaastrichtU-IDS/play-fair/tree/main/data

Any idea how to solve it?

even creating a python virtual environment I get the same error [1].

best,

c.

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

1 participant