Skip to content

Conversation

@EfrosIonelu
Copy link

  • fix: 'NoneType' object has no attribute 'lower'

- fix: 'NoneType' object has no attribute 'lower'
@RamilCDISC
Copy link
Collaborator

Could you please add more details regarding why this fix is being made. What is the issue that was observed. If there is a ticket for it could you please attach it?

@EfrosIonelu
Copy link
Author

I tried to validate a non-completed json, an i hit an error there
entity.lower(), message that 'NoneType' object has no attribute 'lower' is incomplete and doesn't help

Copy link
Collaborator

@SFJohnson24 SFJohnson24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have also tagged @ASL-rmarshall as he is far more familiar with USDM than I am

dataset_dict = {}
for path in metadata:
entity = path["entity"]

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seem null/none entities are meant to go through to the codeblock on 467 per the comment on 466. Could this be resolved simply by changing line 464 to if entity and entity.lower() == "code": ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can make this change if there will be no errors after

Copy link
Collaborator

@ASL-rmarshall ASL-rmarshall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before approving this change, I'd want to know why the entity was not found/assigned. Please either provide a copy of the "non-completed json" file or describe in more detail what was missing.

@EfrosIonelu
Copy link
Author

EfrosIonelu commented Jan 12, 2026

Before approving this change, I'd want to know why the entity was not found/assigned. Please either provide a copy of the "non-completed json" file or describe in more detail what was missing.


I finished a month ago, my part on the project that was using https://github.com/transcelerate/ddf-sdr-api
We used the endpoint /studydefinitions/validate-usdm-conformance to validate usdm.

Version of this project on our server, was updated by your team, as project is growing.

But as i want to help you:
The json i think is looking like:
https://jsoneditoronline.org/#left=cloud.f96d246946004bc2a5b15b98f414e705
and i get now

{
    "statusCode": "400",
    "message": "An Error Occured"
}

i don't have access to debug that error, but i think is the same error as before.

Hope it helps.

@OGarcia11
Copy link
Collaborator

@pendingintent can you take a look a this?

@SFJohnson24 SFJohnson24 added this to the DDF 2.0 milestone Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants