|delete<http://stackoverflow.com/questions/15821953/mysql-and-python-datetime#>
|flag<http://stackoverflow.com/questions/15821953/mysql-and-python-datetime#>
edited just now <http://stackoverflow.com/posts/15821953/revisions>
asked 15 mins ago
<http://stackoverflow.co
I think you nailed it. This is the problem. I will follow the approach you
indicated. Thank you Michael. I appreciate it.
On Tuesday, April 2, 2013 1:35:07 PM UTC-7, Michael Bayer wrote:
> if you're doing a query that is causing the database connection to simply
> fail, then you'd need to addr
To clarify my environment. I have a VM (Linux Redhat) which has MySQL
server running on it. My script runs locally on the same machine. It is a
simple script that is doing a insert many after processing/parsing a csv
file. I don't have any web apps or anything of that nature.
On Monday, April
I tried to include pool_recycle = 10 (seconds) in my create_engine call but
that doesn't fix the problem. I still get the same error. Hmm
On Monday, April 1, 2013 7:04:48 PM UTC-7, algot...@gmail.com wrote:
>
> I am using the sqlalchemy package in python. I have an operation that
> takes som
Below is the traceback. When it attempts to perform the conn.execute(),
which is the db insert is where it seems to realize the connection is
stale.
Traceback (most recent call last):
File "myscript.py", line 126, in
main()
File "myscript.py", line 33, in main
insert_data(final_dat
Thank you Michael for your response.
So its not a long query that I think is the problem here because I don't
believe the execution gets that far. My suspicion is that it is the line
that computes the dictionary key/value pairs, which takes a long time since
it has to build 677,161 x 10 (colu
I am using the sqlalchemy package in python. I have an operation that takes
some time to execute after I perform an autoload on an existing table. This
causes the following error when I attempt to use the connection:
sqlalchemy.exc.OperationalError: (OperationalError) (2006, 'MySQL server has
I have a file that I download from the internet. It is in .xls format. I
need to save the data to an sql database. So I extract the data as follows:
import xlrd
wb = xlrd.open_workbook(file_contents=xls_file_name.read())
sh = wb.sheet_by_name('Sheet1')
data = [sh.row_values(r) for r in range(sh