Issue with file parsing

Hi Don,

Because you are using a structured text file, if the name and file path of the CSV you are providing to the method are being reused from run to run, one likely possibility is that a ‘schema.ini’ file may already exist for the CSV file used. If this file already exists, then the driver VENUS uses to process structured text files will apply whatever schema was appropriate for a previous file to the current file, which can cause issues of this nature. Check these posts for more context:

https://forums.pylabrobot.org/t/issues-with-newly-installed-venus/1249/5?u=nickhealy_hamilton

https://forums.pylabrobot.org/t/sql-open-file-error/2267/4?u=nickhealy_hamilton

When processing structured text files using VENUS, it is best practice to check for the presence of a schema.ini file in the directory that the CSV file is stored (this is where the corresponding schema.ini gets generated by the connection driver) and delete it.

Check this quick programming example that does this (requires use of the File library from HSL extensions mentioned and linked all over the VENUS section of the forum):

Hope this helps. Thanks.

-Nick

2 Likes