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

Error with translation campaign #30

Open
dfjosullivan opened this issue Aug 7, 2023 · 2 comments
Open

Error with translation campaign #30

dfjosullivan opened this issue Aug 7, 2023 · 2 comments
Assignees

Comments

@dfjosullivan
Copy link
Contributor

dfjosullivan commented Aug 7, 2023

See test in test_refactor

    def test_translation_campaign(self, setup_teardown, generate_connection):
        typedb_sink = TypeDBSink(connection=generate_connection,
                                 clear=True,
                                 import_type=import_type)
        json_text = self.get_json_from_file(translation_campaign_path())

        result = typedb_sink.add(json_text)
        self.validate_successful_result(result)

Error

Traceback (most recent call last):
  File "C:\Users\denis\PycharmProjects\Stix-ORM\stixorm\module\typedb.py", line 366, in __generate_instructions
    typeql_object_result = self.__generate_typeql_object(stix_dict)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\denis\PycharmProjects\Stix-ORM\stixorm\module\typedb.py", line 346, in __generate_typeql_object
    stix_obj = parse(stix_dict, False, self.import_type)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\denis\PycharmProjects\Stix-ORM\stixorm\module\parsing\parse_objects.py", line 43, in parse
    obj = dict_to_stix(obj, allow_custom, import_type)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\denis\PycharmProjects\Stix-ORM\stixorm\module\parsing\parse_objects.py", line 170, in dict_to_stix
    raise ParseError(f'the object is not known, and custom is not enabled')
stix2.exceptions.ParseError: the object is not known, and custom is not enabled

@dfjosullivan
Copy link
Contributor Author

Language Content content cannot be parsed by parse_objects.py and will error at line 170

raise ParseError(f'the object is not known, and custom is not enabled')
{'type': 'language-content', 'id': 'language-content--b86bd89f-98bb-4fa9-8cb2-9ad421da981d', 'spec_version': '2.1', 'created': '2017-02-08T21:31:22.007Z', 'modified': '2017-02-08T21:31:22.007Z', 'object_ref': 'campaign--12a111f0-b824-4baf-a224-83b80237a094', 'object_modified': '2017-02-08T21:31:22.007Z', 'contents': {'de': {'name': 'Bank Angriff', 'description': 'Weitere Informationen über Banküberfall'}, 'fr': {'name': 'Attaque Bank', 'description': "Plus d'informations sur la crise bancaire"}}}

@brettforbes brettforbes self-assigned this Aug 13, 2023
@brettforbes
Copy link
Collaborator

I will do this, but i am putting it on-hold till after we have demos, as we dont need this for the demos and they take priority

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

2 participants