0

Parametric Analysis Tool: Decoding SQL file

I am attempting to read data generated by a PAT simulation into python using the associated .sql file. The sql file opens fine in the Data Viewer, but when importing into python, I receive the following error: "'utf-8' codec can't decode byte 0xa8 in position 27: invalid start byte". I have also tried importing the file using Microsoft SQL Server Management Studio but get similar warnings regarding the encoding.

Opening the file in a text editor, I see this in the header:

SQLite format 3   @ ¨ ½ 2   ¨ .Cà ì (ûöñìN’䫏F ƒ

I am new to PAT and SQL...is there something I am missing about the encoding/decoding of this file that would make it useable? It looks very different in the text editor from other SQL files I have seen.

cdgreen-wcec's avatar
1
cdgreen-wcec
asked 2023-08-11 17:38:45 -0500
Aaron Boranian's avatar
14.1k
Aaron Boranian
updated 2023-08-12 11:10:50 -0500
edit flag offensive 0 remove flag close merge delete

Comments

How did you try to load it in python? Share the code.

Julien Marrec's avatar Julien Marrec (2023-09-08 02:05:08 -0500) edit
add a comment see more comments

1 Answer

0

I'm not positive this is your issue, but I'd suggest specifying UTF-16 as the codec. That seems to be the default encoding for SQL files. See Stack Overflow post

Greg Collins's avatar
530
Greg Collins
answered 2023-08-30 09:23:13 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments