Single Page PDF fails during field prediction
See attached file for an example
Example.pdf Looks like the 2nd image file was not created (not sure if you create during upload or phrase extraction)
Error in web console:
api.js:127
POST http://127.0.0.1:3001/process/fields 500 (INTERNAL SERVER ERROR)
predictFields @ api.js:127
handleStageClick @ ProcessingStages.jsx:321
onClick @ ProcessingStages.jsx:658
callCallback @ react-dom.development.js:4164
invokeGuardedCallbackDev @ react-dom.development.js:4213
invokeGuardedCallback @ react-dom.development.js:4277
invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291
executeDispatch @ react-dom.development.js:9041
processDispatchQueueItemsInOrder @ react-dom.development.js:9073
processDispatchQueue @ react-dom.development.js:9086
dispatchEventsForPlugins @ react-dom.development.js:9097
(anonymous) @ react-dom.development.js:9288
batchedUpdates$1 @ react-dom.development.js:26179
batchedUpdates @ react-dom.development.js:3991
dispatchEventForPluginEventSystem @ react-dom.development.js:9287
dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465
dispatchEvent @ react-dom.development.js:6457
dispatchDiscreteEvent @ react-dom.development.js:6430Understand this error
ProcessingStages.jsx:509 Processing failed: Error: [Errno 2] No such file or directory: '/Users/anand/TWIX/tests/out/Example/_image/1.jpg'
at Object.predictFields [as apiFunction] (api.js:134:1)
at async handleStageClick (ProcessingStages.jsx:321:1)
FYI i did check the directory in question and it contained only 0.jpg
We appreciate your feedback! In the current version, TWIX is designed to learn shared structures from multiple records generated by the same template, so it assumes more than one record (or at least more than one page) as input. We plan to enhance TWIX in an upcoming minor update to support single-PDF cases. Stay tuned—we’ll let you know once the new version is released. Thanks again for sharing your example!
Hi,
We’ve just added support for TWIX to handle single-page PDFs. We tested it on your example, and TWIX was able to infer the template correctly. However, during data extraction, it only returned a subset of the table data. This is because the table header contains duplicate column names, and TWIX internally uses a dictionary to store column-value pairs—retaining only unique column names.
We plan to address this issue, which will also involve updating the data structure in the user interface. If the column names are not duplicated, TWIX should extract all the data. We'll work on supporting duplicate column names to ensure complete data extraction and release an update soon.
Thanks again for sharing your example.