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

/var/lib/opensemanticsearch/manage.py AttributeError: 'OntologyTagger' object has no attribute 'preferredLabel' #470

Open
kf9ed opened this issue Jun 28, 2023 · 0 comments

Comments

@kf9ed
Copy link

kf9ed commented Jun 28, 2023

Hi

am trying to build on Rocky Linux 9, Python 3.9.16 and getting the following error:

[root@localhost ]# python3 /var/lib/opensemanticsearch/manage.py entities
Importing Ontology or List Law codes (ID: 1)
/var/opensemanticsearch/media/ontologies/law_codes.rdf
Detected content type: application/rdf+xml
Detected encoding: utf-8
Traceback (most recent call last):
File "/var/lib/opensemanticsearch/manage.py", line 12, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.9/site-packages/django/core/management/init.py", line 381, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.9/site-packages/django/core/management/init.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 364, in execute
output = self.handle(*args, **options)
File "/var/lib/opensemanticsearch/ontologies/management/commands/entities.py", line 9, in handle
ontologies.views.write_named_entities_config()
File "/var/lib/opensemanticsearch/ontologies/views.py", line 621, in write_named_entities_config
ontology_tagger.apply(target_facet=facet)
File "/usr/lib/python3.9/site-packages/solr_ontology_tagger.py", line 591, in apply
self.import_entity(s, target_facet=target_facet, queryfields=queryfields, lang=lang, narrower=narrower)
File "/usr/lib/python3.9/site-packages/solr_ontology_tagger.py", line 374, in import_entity
preferred_label = str(self.get_preferred_label(subject=s, lang=lang))
File "/usr/lib/python3.9/site-packages/solr_ontology_tagger.py", line 261, in get_preferred_label
preferred_label = self.preferredLabel(subject=subject, lang=lang, labelProperties=self.labelProperties)
AttributeError: 'OntologyTagger' object has no attribute 'preferredLabel'
[root@localhost ]#

how to resolve this?

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