TypeError: 'NoneType' object is not callable

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

TypeError: 'NoneType' object is not callable

Pakbi
prop_value =""        
with onto4:
           class farmaco:
               pass
           farmxc = str(self.texty.GetValue())
           ind = onto4.farmaco(farmxc)
           prop_value = getattr(ind, "fenilchetonuria").append(prop_value)

I want  to obtain value of data property "fenilchetonuria"




"C:\Users\Pasquale Bonasia\PycharmProjects\pythonProject2\venv\Scripts\python.exe" "C:/Program Files/JetBrains/PyCharm Community Edition 2022.2.2/plugins/python-ce/helpers/pydev/pydevd.py" --multiprocess --qt-support=auto --client 127.0.0.1 --port 53132 --file "C:\Users\Pasquale Bonasia\PycharmProjects\pythonProject2\main.py"
* Owlready2 * Warning: optimized Cython parser module 'owlready2_optimized' is not available, defaulting to slower Python implementation
caught a TypeError, retrying call to <class 'owlready2.rdflib_store.TripleLiteRDFlibStore'>.bind without override, see https://github.com/RDFLib/rdflib/issues/1880 for more info
Traceback (most recent call last):
  File "C:\Users\Pasquale Bonasia\PycharmProjects\pythonProject2\venv\lib\site-packages\rdflib\namespace\__init__.py", line 627, in _store_bind
    return self.store.bind(prefix, namespace, override=override)
TypeError: bind() got an unexpected keyword argument 'override'
caught a TypeError, retrying call to <class 'owlready2.rdflib_store.TripleLiteRDFlibStore'>.bind without override, see https://github.com/RDFLib/rdflib/issues/1880 for more info
Traceback (most recent call last):
  File "C:\Users\Pasquale Bonasia\PycharmProjects\pythonProject2\venv\lib\site-packages\rdflib\namespace\__init__.py", line 627, in _store_bind
    return self.store.bind(prefix, namespace, override=override)
TypeError: bind() got an unexpected keyword argument 'override'
caught a TypeError, retrying call to <class 'owlready2.rdflib_store.TripleLiteRDFlibStore'>.bind without override, see https://github.com/RDFLib/rdflib/issues/1880 for more info
Traceback (most recent call last):
  File "C:\Users\Pasquale Bonasia\PycharmProjects\pythonProject2\venv\lib\site-packages\rdflib\namespace\__init__.py", line 627, in _store_bind
    return self.store.bind(prefix, namespace, override=override)
TypeError: bind() got an unexpected keyword argument 'override'
caught a TypeError, retrying call to <class 'owlready2.rdflib_store.TripleLiteRDFlibStore'>.bind without override, see https://github.com/RDFLib/rdflib/issues/1880 for more info
Traceback (most recent call last):
  File "C:\Users\Pasquale Bonasia\PycharmProjects\pythonProject2\venv\lib\site-packages\rdflib\namespace\__init__.py", line 627, in _store_bind
    return self.store.bind(prefix, namespace, override=override)
TypeError: bind() got an unexpected keyword argument 'override'
caught a TypeError, retrying call to <class 'owlready2.rdflib_store.TripleLiteRDFlibStore'>.bind without override, see https://github.com/RDFLib/rdflib/issues/1880 for more info
Traceback (most recent call last):
  File "C:\Users\Pasquale Bonasia\PycharmProjects\pythonProject2\venv\lib\site-packages\rdflib\namespace\__init__.py", line 627, in _store_bind
    return self.store.bind(prefix, namespace, override=override)
TypeError: bind() got an unexpected keyword argument 'override'
Traceback (most recent call last):
  File "C:\Users\Pasquale Bonasia\PycharmProjects\pythonProject2\main.py", line 309, in compatibilita
    ind = onto4.farmaco(farmxc)
TypeError: 'NoneType' object is not callable
Reply | Threaded
Open this post in threaded view
|

doesn't work

Pakbi
        with onto4:
           class Farmaco:
               pass
           ind = onto4.Farmaco(str(farmcx))
           prop_value = getattr(ind, "fenilchetonuria")
           prop_value2 = getattr(ind, "diabete")
           prop_value3 = getattr(ind, "celiachia")
           prop_value4 = getattr(ind, "lattosio")