I wasn't able to reproduce the same error when I ran your workspace. It actually ran successfully with a json output in C:\\test\\gml_data\\sample.json. I tried it with both FME 2018 and FME 2019.
I don't see anything in your workspace referring to 'C:\\conversions\\...'. Is there anything else you can tell us about your environment which might help explain why you are getting this error?
I noticed you were working on a similar error in a Forum Post from December (dxf to GEOJSON)... were you able to resolve that issue?
I wasn't able to reproduce the same error when I ran your workspace. It actually ran successfully with a json output in C:\\test\\gml_data\\sample.json. I tried it with both FME 2018 and FME 2019.
I don't see anything in your workspace referring to 'C:\\conversions\\...'. Is there anything else you can tell us about your environment which might help explain why you are getting this error?
I noticed you were working on a similar error in a Forum Post from December (dxf to GEOJSON)... were you able to resolve that issue?
Actually im not this process manually,im doing it using code by running the command line,im getting error when im doing the conversion using the code,its creating a folder with .json but not json,but when im running the conversion command manually the conversion is happening.What colud be the reason.Even dxf to geojson conversion is also having same issue.Converting to other formats is working fine with my code,but im getting error only with json output.
Actually im not this process manually,im doing it using code by running the command line,im getting error when im doing the conversion using the code,its creating a folder with .json but not json,but when im running the conversion command manually the conversion is happening.What colud be the reason.Even dxf to geojson conversion is also having same issue.Converting to other formats is working fine with my code,but im getting error only with json output.
I see. Are you running it in command line or something else? Are you able to share the code/argument(s) you are using to run the workspace?
I see. Are you running it in command line or something else? Are you able to share the code/argument(s) you are using to run the workspace?
Yes im running the conversion in commandline.
"C:\\Program Files\\FME\\fme.exe" C:\\test\\gml_to_json\\gml2json.fmw --SourceDataset_CITYGML "C:\\Users\\Administrator\\Desktop\\sample.gml" --FEATURE_TYPES "RoofSurface" --DestDataset_JSON "C:\\Users\\Administrator\\Desktop\\test_data\\test.json"
is the command im running.I was able to convert by executing the command manually.But when im trying to do it with code im not getting the json output its creating a folder with the given json name.
I executed the same code for other data type conversions they all converted and got correct output.But im getting issues only with json what colud be the reason.Where im going wrong.
Yes im running the conversion in commandline.
"C:\\Program Files\\FME\\fme.exe" C:\\test\\gml_to_json\\gml2json.fmw --SourceDataset_CITYGML "C:\\Users\\Administrator\\Desktop\\sample.gml" --FEATURE_TYPES "RoofSurface" --DestDataset_JSON "C:\\Users\\Administrator\\Desktop\\test_data\\test.json"
is the command im running.I was able to convert by executing the command manually.But when im trying to do it with code im not getting the json output its creating a folder with the given json name.
I executed the same code for other data type conversions they all converted and got correct output.But im getting issues only with json what colud be the reason.Where im going wrong.
Thanks @san! So we can try replicating the issue, can you please tell us exactly how your are running the command with code?
I have noticed some odd issues with complex paths or filenames in recent releases especially when working with a *nix OS like Mac but my Windows VMs have had the same issue. I have had to use a creator and add the path to the record, then use a feature reader and map the path to the attribute.
I changed the workbench you attached, hope this is the same issue you are having and it works for you.
FeatRead_citygml2json.fmw
I have noticed some odd issues with complex paths or filenames in recent releases especially when working with a *nix OS like Mac but my Windows VMs have had the same issue. I have had to use a creator and add the path to the record, then use a feature reader and map the path to the attribute.
I changed the workbench you attached, hope this is the same issue you are having and it works for you.
FeatRead_citygml2json.fmw
Still getting the same error.
JSON Writer: Cannot create dataset: 'C:\\conversions\\f114f22c-1e27-4b2f-955a-1f9621713485\\0664_M-34-47-C-b-4-4.json' of type Directory, expected a dataset of type Regular file.
I'm not knowing why this error is occuring. I have followed the process u have mentioned.
It was giving error when running through code.But when im running the same command obtained from the code manually its giving me output.All other conversions are working fine with my code.Only json output is troubling me.
Still getting the same error.
JSON Writer: Cannot create dataset: 'C:\\conversions\\f114f22c-1e27-4b2f-955a-1f9621713485\\0664_M-34-47-C-b-4-4.json' of type Directory, expected a dataset of type Regular file.
I'm not knowing why this error is occuring. I have followed the process u have mentioned.
It was giving error when running through code.But when im running the same command obtained from the code manually its giving me output.All other conversions are working fine with my code.Only json output is troubling me.
What code you are using? If the workspace is running fine manually and using cmd, I'm wondering if there's something in the code you are using that might be causing the error.
If you are using FME objects, a fellow Safer suggested that we generally recommend using the FMEWokrspaceRunner method as this should behave exactly the same as running a workspace in FME Workbench. Check out this tutorial which demonstrates this: Run an FME Workspace from Python using FMEWorkspaceRunner. I hope this helps!