signavio/sap-sam

Getting error invalid_request_missing_parameter

chrsdrdt opened this issue · 1 comments

Hi and thank you for your work!

I try to use your code to convert BPMN diagrams to an image. However, I run into an error when trying:

Traceback (most recent call last):                                                                                            
  File "convert_to_bpmn.py", line 41, in <module>
  	image_request = gen.generate_image(model_name, model_json, model_namespace)
  File "venv/lib/python3.10/site-packages/sapsam-0.0.1-py3.10.egg/sapsam/ImageGenerator.py", line 117, in generate_image
    return self.generate_representation(name, data, namespace, 'png', deletes)
  File "venv/lib/python3.10/site-packages/sapsam-0.0.1-py3.10.egg/sapsam/ImageGenerator.py", line 91, in generate_representation
    model_id = result['href'].replace('/model/', '')
KeyError: 'href'

When printing the result variable from line 90, I get the following data, including an error message:

{'requestId': '***deleted***', 'message': 'Ein Fehler ist aufgetreten (invalid_request_missing_parameter)', 'errors': ['invalid_request_missing_parameter']}

I checked the login data end entered a wrong password, which lead to a different error. In addition, the authenticator information looked good when printing them with the correct login information.

Can you help me? What am I doing wrong?

I debugged this together with @ccoreaSAP, and we found the problem:

I actually objectified the json from the csv and handed the object over to the generator instead of the json as plain text :)