Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #83800
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <jacob@blindza.co.za> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.002 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'causing': 0.04; 'interpreter': 0.05; 'dev': 0.07; 'duplicate': 0.07; 'stops': 0.07; 'test,': 0.07; 'cursor': 0.09; 'function,': 0.09; 'pyodbc': 0.09; 'python': 0.11; '2.7': 0.14; 'changes': 0.15; 'both,': 0.16; 'either/both': 0.16; 'jacob': 0.16; 'operates': 0.16; 'popping': 0.16; 'received:opentransfer.com': 0.16; 'relevant,': 0.16; 'seconds,': 0.16; 'ignore': 0.16; 'all,': 0.19; 'bit': 0.19; 'trying': 0.19; 'basically': 0.19; 'implementing': 0.19; 'working.': 0.19; 'command': 0.22; 'machine': 0.22; 'import': 0.22; 'issue.': 0.22; 'otherwise,': 0.22; 'error': 0.23; 'issue,': 0.24; 'sorry,': 0.24; 'stick': 0.24; 'fine': 0.24; 'guys': 0.24; 'versions': 0.24; "haven't": 0.24; 'sort': 0.25; 'script': 0.25; 'compiled': 0.26; 'second': 0.26; 'tried': 0.27; 'idea': 0.28; 'function': 0.29; 'character': 0.29; 'thus': 0.29; 'mode': 0.30; 'statement': 0.30; "i'm": 0.30; 'code': 0.31; '"",': 0.31; 'gather': 0.31; 'prevention': 0.31; "they'll": 0.31; 'file': 0.32; 'class': 0.32; 'there.': 0.32; 'figure': 0.32; 'text': 0.33; 'open': 0.33; 'actual': 0.34; 'moment': 0.34; 'connection': 0.35; 'except': 0.35; 'something': 0.35; 'test': 0.35; 'but': 0.35; 'there': 0.35; 'version': 0.36; 'really': 0.36; 'executing': 0.36; 'instances': 0.36; 'interface,': 0.36; 'machine.': 0.36; 'object,': 0.36; 'done': 0.36; 'similar': 0.36; 'operating': 0.37; 'two': 0.37; 'step': 0.37; 'implement': 0.38; 'server': 0.38; 'stopped': 0.38; 'version,': 0.38; 'to:addr:python-list': 0.38; 'issue': 0.38; 'list,': 0.38; 'track': 0.38; 'that,': 0.38; 'anything': 0.39; 'aside': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'either': 0.39; 'skip:p 20': 0.39; 'called': 0.40; 'space': 0.40; 'how': 0.40; 'even': 0.60; 'logs': 0.60; 'then,': 0.60; 'up,': 0.60; 'tell': 0.60; 'received:unknown': 0.61; 'issues,': 0.61; 'matter': 0.61; 'making': 0.63; 'side': 0.67; 'close': 0.67; 'line,': 0.68; 'to,': 0.72; 'obvious': 0.74; '3.4': 0.84; 'relating': 0.93; 'connection,': 0.95 |
| Comment | DKIM? See http://www.dkim.org |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=blindza.co.za; s=dkim-shared; x=1421914406; h=Comment: DomainKey-Signature:Received:Received:Message-ID:From:To:Subject: Date:MIME-Version:Content-Type; bh=cccJgvN7KpRTIKmSedxCU2wAn+KbZ ZpPKI+70DcTDS0=; b=gW2m74/6i1C1YhvsNgvGnrnPexIXvfEVcQzH5RjOhi6wc FjedAk6uM2rjXDym4JhYnrw1mHlpz6reJWueuN17s+uhDYvNZ/J7bDkoccIEYeN9 l8fXi4MvNtWOlPUh2W2wLqvt8NVmkk9iIdHWYxGOCMeOvXnhYybqY+NxjszV6s= |
| Comment | DomainKeys? See http://antispam.yahoo.com/domainkeys |
| DomainKey-Signature | a=rsa-sha1; q=dns; c=nofws; s=dkim-shared; d=blindza.co.za; h=Received:Received:X-Originating-IP:Message-ID:From:To:Subject:Date:MIME-Version:Content-Type:X-Priority:X-MSMail-Priority:X-Mailer:X-MimeOLE; b=E7IocAfk3cvduPf/hcv8+m7jcW7jRYolOV27aQ6nfj9wqj3+Woa9IMdfHCUBpm S58qwrgjZw1/cSTHtbCiAcmbJ+8oENuF1hN3LEtF4nXenmqcbb/O2wB9V7pxJzDE SfKgjNvSp1d+nhJpDhic9EdIb7r2wWR7VWU4t7kZThqvw=; |
| X-Originating-IP | 105.237.17.61 |
| From | "Jacob Kruger" <jacob@blindza.co.za> |
| To | <python-list@python.org> |
| Subject | MySQL connections |
| Date | Thu, 15 Jan 2015 10:13:14 +0200 |
| MIME-Version | 1.0 |
| Content-Type | multipart/alternative; boundary="----=_NextPart_000_0003_01D030AB.E0083700" |
| X-Priority | 3 |
| X-MSMail-Priority | Normal |
| X-Mailer | Microsoft Windows Mail 6.0.6002.18197 |
| X-MimeOLE | Produced By Microsoft MimeOLE V6.1.7601.17609 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.17744.1421309609.18130.python-list@python.org> (permalink) |
| Lines | 213 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1421309609 news.xs4all.nl 2871 [2001:888:2000:d::a6]:33048 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:83800 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
Development machine is windows7 64 bit machine, now working with either/both python 2.7 or 3.4 - test purposes, trying to figure out if this was something like a version incompatibility issue, and tried using both XAMPP and WAMP MySQL server version 5.0.11 instances thus far.
Now, aside from all other issues relating to character encoding, etc., now down to, hopefully, final issue.
Side note is under python 2.7, I use pyodbc to gather data from .mdb file am using to test, but under python 3.4, I use pypyodbc for same functionality.
Now, current/actual issue is something can sort of duplicate using both MySQLdb version of mysqlclient, as well as pymysql using both python 2.7 and python 3.4, but, strange thing am trying to figure out is that even if just implement a connection object in interpreter of either version, retrieve an instance of a cursor object, and do various types of statement executions, no issues, and can then close connection, or cursor, or both, and all good/fine/well.
However, if implement similar code - down to just trying to open a connection, wait a few seconds, and then close it again, inside a function called from a prior function, in the class am implementing in a file called/executed from command line, then, the moment I try to close the connection, whether or not have done anything with it, that's when I get that python.exe has stopped working/responding error message popping up, and python bombs out.
Have no idea how to try track down actual source/cause of issue, since haven't found anything obvious in system event logs, nothing appearing in MySQL server logs that makes sense/appears relevant, and no matter if I try enclosing the connection open/close code inside try except code blocks, nothing happens there except that python just stops cooperating at all, and stops working.
Now did try making sure data execution prevention was turned on/off, and that if set to second mode then told it to ignore specific applications - added both python.exe, and the compiled version of my code to it's exemption list, but, no changes there.
This still operates fine on my other dev machine, but, would like to know why it's not operating on one specific machine.
Otherwise, will just have to tell guys that, sorry, will only be able to generate SQL script text files, and they'll have to stick to the final step of then executing those via MySQL console interface, or something, but, would really prefer to at the very least, figure/find out what's causing this mis-behaviour.
Thoughts/suggestions with regards to how to find out what is happening/what I'm doing/handling wrong/incorrectly?
The two current versions of the code - which work fine under interpreter of both versions of python are basically the following:
#pymysql version
import pymysql
cn = pymysql.connect("localhost", "root", "", "import_test")
time.sleep(5)
cn.close()
#MySQLdb version
import MySQLdb
cn = MySQLdb.connect("localhost", "root", "", "import_test")
time.sleep(5)
cn.close()
#end code
Stay well (away from this machine ;) )
Jacob Kruger
Blind Biker
Skype: BlindZA
"Roger Wilco wants to welcome you...to the space janitor's closet..."
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
MySQL connections "Jacob Kruger" <jacob@blindza.co.za> - 2015-01-15 10:13 +0200
csiph-web