allure-framework / allure-python

Allure integrations for Python test frameworks
https://allurereport.org/
Apache License 2.0
725 stars 237 forks source link

Deserialization error when attachments value is array #674

Closed wu-clan closed 2 years ago

wu-clan commented 2 years ago

error msg:

Could not read test result file .\allure_report\435207b7-6355-4679-941d-d4354ea2a547-result.json
com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `java.lang.String` from Array value (token `JsonToken.START_ARRAY`)
 at [Source: (sun.nio.ch.ChannelInputStream); line: 1, column: 991] (through reference chain: io.qameta.allure.model.TestResult["attachments"]->java.util.ArrayList[0]->io.qameta.allure.model.Attachment["type"])
wu-clan commented 2 years ago

I think I found the wrong reason, I used a custom AttachmentType