Hi @townest, would you be able to provide a copy of your workspace, python script, and sample source data? If you are not comfortable sharing your files publicly, I recommend submitting a support case where one of our Technical Support Specialists will be happy to help you.
I have not found any related information internally, so it sounds like this could possibly be a new bug with either the FME Python API or the HYPER writer.
Hi @townest, would you be able to provide a copy of your workspace, python script, and sample source data? If you are not comfortable sharing your files publicly, I recommend submitting a support case where one of our Technical Support Specialists will be happy to help you.
I have not found any related information internally, so it sounds like this could possibly be a new bug with either the FME Python API or the HYPER writer.
I'll see what I can do replicating it with dummy data. Thx.
@danminneyatsaf ,
I was able to replicate the issue with a simple data set and simple transformation. The following script works writing to csv and errors writer to hyper. Disable and enable the writers as necessary to test. The fmw works on both csv and hyper without using Python API scripting.
import sys
print(f'python verion:\n{sys.version}\n')
sys.path.append(r'C:\Program Files\FME\fmeobjects\python37') # correct version as of Oct 2021
import fmeobjects
wkspc_path = r'C:\temp\python_api_test_1.fmw'
wkspc = fmeobjects.FMEWorkspaceRunner()
print(f'workspace object:\n{wkspc}\n')
pnames = wkspc.getPublishedParamNames(wkspc_path)
print(f'default parameter names:\n{pnames}\n')
params = {}
for pname in pnames:
paramsnpname] = wkspc.getParamDefaultValue(wkspc_path, pname)
print(f'parameter dictionary:\n{params}\n')
wkspc.runWithParameters(wkspc_path, params)
print(f'script complete')
To run this hands free, this script gets the parameter names and values to pass into the runWithParameters method. Following is the input file:
col1,col2,col3,col4
1,cat1,red,500
2,cat1,blue,1000
3,cat2,blue,23
4,cat3,green,34
@danminneyatsaf ,
Were you able to see the issue with the data provided? Let me know. Thx.
Tyler
@danminneyatsaf ,
Were you able to see the issue with the data provided? Let me know. Thx.
Tyler
Hi @townest,
I was able to reproduce the same issue, thank you for sending the script and sample input file. I'm going to reach out to a developer and see what they think about this.
Likely we will have to file a bug report for this. Nothing from the python terminal really gives anything away as to what's causing the issue here, but in all likelihood this is something to do with the Hyper writer and the API as you mentioned.