neo4j-contrib / neomodel

An Object Graph Mapper (OGM) for the Neo4j graph database.
https://neomodel.readthedocs.io
MIT License
963 stars 232 forks source link

TypeError: 'NodeMeta' object is not iterable #649

Closed armindev1383 closed 1 year ago

armindev1383 commented 2 years ago

When I want to display the created models in the admin panel, I get this error

Watching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last): File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/lib/python3.8/threading.py", line 870, in run self._target(*self._args, self._kwargs) File "/usr/local/lib/python3.8/dist-packages/django/utils/autoreload.py", line 64, in wrapper fn(*args, *kwargs) File "/usr/local/lib/python3.8/dist-packages/django/core/management/commands/runserver.py", line 125, in inner_run autoreload.raise_last_exception() File "/usr/local/lib/python3.8/dist-packages/django/utils/autoreload.py", line 87, in raise_last_exception raise _exception[1] File "/usr/local/lib/python3.8/dist-packages/django/core/management/init.py", line 398, in execute autoreload.check_errors(django.setup)() File "/usr/local/lib/python3.8/dist-packages/django/utils/autoreload.py", line 64, in wrapper fn(args, kwargs) File "/usr/local/lib/python3.8/dist-packages/django/init.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/usr/local/lib/python3.8/dist-packages/django/apps/registry.py", line 124, in populate app_config.ready() File "/usr/local/lib/python3.8/dist-packages/django/contrib/admin/apps.py", line 27, in ready self.module.autodiscover() File "/usr/local/lib/python3.8/dist-packages/django/contrib/admin/init.py", line 50, in autodiscover autodiscover_modules("admin", register_to=site) File "/usr/local/lib/python3.8/dist-packages/django/utils/module_loading.py", line 58, in autodiscover_modules import_module("%s.%s" % (app_config.name, module_to_search)) File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 848, in exec_module File "", line 219, in _call_with_frames_removed File "/root/django_project/owlswaper/owlswaper_api/admin.py", line 5, in admin.site.register(Currency) File "/usr/local/lib/python3.8/dist-packages/django/contrib/admin/sites.py", line 117, in register for model in model_or_iterable: TypeError: 'NodeMeta' object is not iterable

OlehChyhyryn commented 2 years ago

Do you use Django neomodel?

mariusconjeaud commented 1 year ago

Hello @armindev1383 , please answer Oleg's question, so we can either investigate or move this to django neomodel issues