Skip to content

test_attr: user-friendly type list#52

Merged
ax3l merged 1 commit intoopenPMD:2.0.Xfrom
ax3l:fix-userErrorMessageTypeList2X
Nov 5, 2019
Merged

test_attr: user-friendly type list#52
ax3l merged 1 commit intoopenPMD:2.0.Xfrom
ax3l:fix-userErrorMessageTypeList2X

Conversation

@ax3l
Copy link
Copy Markdown
Member

@ax3l ax3l commented Nov 5, 2019

Checking the allowed types for attributes such as timeOffset gave a sub-optimal user-hint of the form:

Error: Attribute timeOffset in `/data/0/particles/electron/positionOffset`
is not of type '<map object at 0x11aa73050>' (is 'str')!`

Let's concat the types properly to

Error: Attribute timeOffset in `/data/0/particles/electron/positionOffset`
is not of type 'float32' or 'float64' (is 'str')!

Same as #51 but for the upcoming 2.X release of openPMD.

Thanks for the report, @rfbird! ✨

Checking the allowed types for attributes such as `timeOffset` gave
a suboptimal user-hint of the form:
```
Error: Attribute timeOffset in /data/0/particles/electron/positionOffset`
is not of type '<map object at 0x11aa73050>' (is 'float32')!`
```

Let's concat the types properly to
```
Error: Attribute timeOffset in /data/0/particles/electron/positionOffset`
is not of type 'float32' or 'float64' (is 'str')!
```

Thanks for the report, @rfbird! ✨
@ax3l ax3l merged commit b16d82f into openPMD:2.0.X Nov 5, 2019
@ax3l ax3l deleted the fix-userErrorMessageTypeList2X branch November 5, 2019 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants