View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003742 | OpenFOAM | Bug | public | 2021-10-22 12:16 | 2021-10-22 13:02 |
Reporter | noZeroDays | Assigned To | henry | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Product Version | 9 | ||||
Summary | 0003742: lookup of data from objectRegistry region0 successful but it is not a dictionary, it is a dictionary! | ||||
Description | Hello, I have tried the following with a coded function object: Info << mesh().lookupObject<dictionary>("data") << endl; I got the following error: --> FOAM FATAL ERROR: lookup of data from objectRegistry region0 successful but it is not a dictionary, it is a dictionary However, when I use IOobject it doesn't complain: Info << mesh().lookupObject<IOdictionary>("data") << endl; | ||||
Steps To Reproduce | Create a coded function object and add the line above. | ||||
Tags | No tags attached. | ||||
|
Sorry in the last paragraph I mean; "However, when I use IOdictionary it doesn't complain " |
|
You have not provided sufficient information to reproduce the problem. |
|
IOdictionary is a registered object but dictionary is not, you will need to use IOdictionary as the type to lookup. |
|
Sorry for not providing more informations, here is how to reproduce that: Copy the airfoil2D tutorial and add the following at the end of system/controlDict functions { myCodedFunc { type coded; libs ("libutilityFunctionObjects.so"); name something; codeWrite #{ Info << mesh().lookupObject<dictionary>("data") << endl; #}; } } |
|
The thing is that the error message itself is misleading. |
|
You should use lookupObject<IOdictionary> |
|
User error |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-10-22 12:16 | noZeroDays | New Issue | |
2021-10-22 12:17 | noZeroDays | Note Added: 0012245 | |
2021-10-22 12:30 | henry | Note Added: 0012246 | |
2021-10-22 12:36 | henry | Note Added: 0012247 | |
2021-10-22 12:47 | noZeroDays | Note Added: 0012248 | |
2021-10-22 12:48 | noZeroDays | Note Added: 0012249 | |
2021-10-22 13:02 | henry | Note Added: 0012250 | |
2021-10-22 13:02 | henry | Assigned To | => henry |
2021-10-22 13:02 | henry | Status | new => closed |
2021-10-22 13:02 | henry | Resolution | open => no change required |
2021-10-22 13:02 | henry | Note Added: 0012251 |