GithubHelp home page GithubHelp logo

Comments (3)

georghildebrand avatar georghildebrand commented on August 27, 2024 1

@Callidon ack, that import is producing the error. I will open an Issue there. Thx for your fast feedback.

from rdflib-hdt.

Callidon avatar Callidon commented on August 27, 2024

Hi 👋 It seems to be an issue with rdflib itself, because according to the stacktrace you posted, its the line import rdflib.plugins.sparql.evaluate as sparql_evaluate which fails.
Could to try to run this import statement in a separated python file with no rdflib_hdt import and see if the issue remains? if so, then I think you should report the issue to the rdflib project directly.

from rdflib-hdt.

georghildebrand avatar georghildebrand commented on August 27, 2024

@Callidon I just realized that the issue seems to be related to the version of rdflib when cloning and running the import in the latest:6.0.2

python -c "import rdflib.plugins.sparql.evaluate as sparql_evaluate"

Works fine

However, when using 6.0.2 next issue comes up with 'rdflib-hdt' but this time the test of an SPARQL fails it seems...

`============================= test session starts ==============================
platform darwin -- Python 3.9.9, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /workdir/RDFLib/rdflib-hdt
collected 61 items

tests/hdt_document_test.py ........... [ 18%]
tests/hdt_iterators_test.py ................ [ 44%]
tests/hdt_store_test.py ..............................F [ 95%]
tests/join_iterator_test.py .. [ 98%]
tests/wrappers_test.py . [100%]

=================================== FAILURES ===================================
___________________________ test_rdflib_sparql_query ___________________________

def test_rdflib_sparql_query():
    optimize_sparql()
    graph = Graph(store=store)
    sparql_query = """
    PREFIX ex: <http://example.org/>
    SELECT * WHERE {
        ?s ex:p1 ?o
    }
    """
  qres = graph.query(sparql_query)

tests/hdt_store_test.py:80:


pyhdt_venv/lib/python3.9/site-packages/rdflib/graph.py:1301: in query
initNs = initNs or dict(self.namespaces())
pyhdt_venv/lib/python3.9/site-packages/rdflib/graph.py:1004: in namespaces
for prefix, namespace in self.namespace_manager.namespaces():
pyhdt_venv/lib/python3.9/site-packages/rdflib/graph.py:347: in _get_namespace_manager
self.__namespace_manager = NamespaceManager(self)
pyhdt_venv/lib/python3.9/site-packages/rdflib/namespace/init.py:334: in init
for p, n in self.namespaces(): # self.bind is not always called


self = <rdflib.namespace.NamespaceManager object at 0x108d99490>

def namespaces(self):
  for prefix, namespace in self.store.namespaces():

E TypeError: 'NoneType' object is not iterable

pyhdt_venv/lib/python3.9/site-packages/rdflib/namespace/init.py:559: TypeError
=========================== short test summary info ============================
FAILED tests/hdt_store_test.py::test_rdflib_sparql_query - TypeError: 'NoneTy...`

from rdflib-hdt.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.