Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
0

Parametric Analysis Tool: Decoding SQL file

asked 2023-08-11 17:38:45 -0500

updated 2023-08-12 11:10:50 -0500

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.

edit retag flag offensive 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

1 Answer

Sort by » oldest newest most voted
0

answered 2023-08-30 09:23:13 -0500

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

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 2023-08-11 17:38:45 -0500

Seen: 57 times

Last updated: Aug 30 '23