BrickSchema / py-brickschema

Python package for working with Brick (brickschema.org/)
Other
55 stars 15 forks source link

`load_file()` returns an `[Errno 22] Invalid argument` error #114

Closed lymereJ closed 2 months ago

lymereJ commented 4 months ago

Hi -

When I run the following code I get an [Errno 22] Invalid argument error. The turtle file used is this one.

import brickschema
g = brickschema.Graph(load_brick=False)
g.load_file("./constrain/resources/brick/Brick.ttl")

Here's the full traceback:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python310\lib\site-packages\brickschema\graph.py", line 572, in load_file
    self.parse(filename, format=fmt)
  File "C:\Python310\lib\site-packages\rdflib\graph.py", line 1492, in parse
    parser.parse(source, self, **args)
  File "C:\Python310\lib\site-packages\rdflib\plugins\parsers\notation3.py", line 2021, in parse
    p.loadStream(stream)
  File "C:\Python310\lib\site-packages\rdflib\plugins\parsers\notation3.py", line 479, in loadStream
    return self.loadBuf(stream.read())  # Not ideal
OSError: [Errno 22] Invalid argument

I'm using brickschema 0.7.5 and rdflib 7.0.0 with Python 3.10.8. Any idea as to why this is happening?

lymereJ commented 4 months ago

I tried different versions of Python and I'm still getting the same error.

lymereJ commented 2 months ago

Issue with Microsoft's OneDrive software. See https://github.com/RDFLib/rdflib/issues/2790.