Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'scripts': 0.03; 'else:': 0.03; 'interpreter': 0.05; 'pop': 0.05; 'subject:Python': 0.06; 'debugging': 0.07; 'dev': 0.07; 'finally:': 0.07; 'app,': 0.09; 'exits': 0.09; 'f.close()': 0.09; 'insertion': 0.09; 'locale': 0.09; 'skip:# 30': 0.09; 'structure,': 0.09; 'subject:2.7': 0.09; 'try:': 0.09; 'runs': 0.10; 'python': 0.11; 'def': 0.12; 'windows': 0.15; '"":': 0.16; 'closed")': 0.16; 'exc_type,': 0.16; 'jacob': 0.16; 'received:opentransfer.com': 0.16; 'relevant,': 0.16; 'res': 0.16; 'specific,': 0.16; 'subject:bit': 0.16; 'subject:issue': 0.16; 'through,': 0.16; '{0}': 0.16; 'exception': 0.16; 'skip:# 20': 0.16; 'bit': 0.19; 'module': 0.19; 'trying': 0.19; 'finished': 0.19; 'skip:p 40': 0.19; 'slightly': 0.19; 'working.': 0.19; 'command': 0.22; 'code,': 0.22; 'handles': 0.22; 'issue.': 0.22; 'id:': 0.23; 'error': 0.23; 'instance,': 0.24; 'skip:l 30': 0.24; 'skip:{ 20': 0.24; 'sorry,': 0.24; 'versions': 0.24; "haven't": 0.24; 'mention': 0.26; 'query': 0.26; 'pass': 0.26; 'code:': 0.26; 'installed': 0.27; 'function': 0.29; 'google,': 0.29; 'database,': 0.30; 'errors': 0.30; 'code': 0.31; 'software,': 0.31; 'exclude': 0.31; 'fault': 0.31; 'fine,': 0.31; 'subject:development': 0.31; 'timestamp:': 0.31; 'figure': 0.32; 'stuff': 0.32; 'run': 0.32; 'running': 0.33; 'actual': 0.34; 'maybe': 0.34; 'could': 0.34; 'problem': 0.35; 'except': 0.35; 'skip:s 30': 0.35; 'skip:u 20': 0.35; 'something': 0.35; 'but': 0.35; 'there': 0.35; 'combination': 0.36; 'executing': 0.36; 'version:': 0.36; 'similar': 0.36; 'application': 0.37; 'operating': 0.37; 'skip:o 20': 0.38; 'machines': 0.38; 'stopped': 0.38; 'handle': 0.38; 'to:addr:python-list': 0.38; 'issue': 0.38; 'fact': 0.38; 'track': 0.38; 'hosted': 0.39; 'structure': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'skip:p 20': 0.39; 'space': 0.40; 'how': 0.40; 'up,': 0.60; 'received:unknown': 0.61; 'conversion': 0.61; 'issues,': 0.61; 'completed': 0.61; 'name:': 0.61; 'information': 0.63; 'connecting': 0.64; 'telling': 0.64; 'total': 0.65; 'number:': 0.66; 'here': 0.66; 'direct': 0.67; 'past.': 0.68; 'results': 0.69; 'information:': 0.72; 'everything,': 0.84; 'skip:6 20': 0.84; '2013': 0.98 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=1421747010; h=Comment: DomainKey-Signature:Received:Received:Message-ID:From:To:Subject: Date:MIME-Version:Content-Type; bh=joR4PKBOU4X5QCS/ObVf6YmN18TY/ 5qKwp2dZP/FlKk=; b=e5Qy1D52iADFvVUMKDb9RVnLBYdKynkgfbMdYlEYEcv36 4Yc/kkQ1itIgKryiX009fEcAWKBzz6nS4cIVii07zDqzQjYNIPv7QKtLp5stFIAf UhndnQhikZP4p9FO0QbApw7EQqwKcgB9WY/R/P05cvPQqiAWebhQctCBOan00g= 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=uHVseNoRWRIJ5wh4tnsfKud6l9Gn3kVp7H2MurLwFGIbRwN9xcfI91ktRO9njQ jrvlW+97nmXPIcQEB/e9NjqNxMXfPJAR/nlc636DEJ5Ir3d9qHe8G+A39I+0zi5B bRvhnJG0Vob8BN4PvyHqRmQem97847RuqZ03FekzPKoL8=; X-Originating-IP: 105.236.166.196 From: "Jacob Kruger" To: Subject: Python 2.7, on windows7 64 bit development machine, inconsistent issue on similar machines Date: Tue, 13 Jan 2015 11:43:24 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_001F_01D02F26.235A7D60" 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 416 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1421142212 news.xs4all.nl 2845 [2001:888:2000:d::a6]:48825 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:83678 This is a multi-part message in MIME format. ------=_NextPart_000_001F_01D02F26.235A7D60 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Trying to run through all steps in data conversion app, and, up to last = point, it's fine, but, if I try to handle direct execution of data = structure, and data insertion scripts against a mySQL database, hosted = locally here on same machine, running under wamp, then after code has = completely finished executing everything, the command line just stops, = and then I get the windows error dialogue pop up, telling me python.exe = has stopped working. If I run the same code on my other dev machine, which might just have a = slightly simpler/cleaner combination of software, etc. installed on it, = then it just runs straight through, and exits python interpreter = instance, with no issues, and am just not sure how to try track down = actual cause of this issue. Here's part of the error dialogue's detailed information: Problem signature: Problem Event Name: APPCRASH Application Name: python.exe Application Version: 0.0.0.0 Application Timestamp: 4c303241 Fault Module Name: StackHash_0a9e Fault Module Version: 0.0.0.0 Fault Module Timestamp: 00000000 Exception Code: c0000005 Exception Offset: 028e1289 OS Version: 6.1.7601.2.1.0.256.1 Locale ID: 2057 Additional Information 1: 0a9e Additional Information 2: 0a9e372d3b4ad19135b953a78882e789 Additional Information 3: 0a9e Additional Information 4: 0a9e372d3b4ad19135b953a78882e789 #---end of error info--- If I look for something similar via google, etc., I come across some = mention of 32-64 bit incompatibility, or something, but, not sure if = relevant, although am working with 32 bit versions of python 2.7, and = both of my dev machines are in fact 64 bit windows7 machines, but = haven't had issues like this in past. Also, if I exclude last part of code, which handles directly working = with MySQL database, then all cooperates fine, but, am pretty sure am = closing all relevant connections, cursors, etc. - here's the last = function that am calling/executing, in case relevant - there is still = some testing/manual debugging stuff in here, but anyway: #---start code--- def convertExport(self): try: f_mysql =3D open("mysql.set", "rb") d_mysql =3D pickle.load(f_mysql) f_mysql.close() cn =3D None s_host =3D str(d_mysql["host"]) s_user =3D str(d_mysql["user"]) s_pass =3D str(d_mysql["password"]) s_db =3D self.s_target_value cn =3D MySQLdb.connect(s_host, s_user, s_pass, s_db) if cn: cn.autocommit =3D True cur =3D cn.cursor() i_struct =3D 0 i_data =3D 0 f =3D open(self.s_sql_struct_file, "rb") s =3D f.read() f.close() l_struct =3D s.split(";") f =3D open(self.s_sql_data_file, "rb") s =3D f.read() f.close() l_data =3D unidecode(s).split(";") l_struct_errors =3D [] l_data_errors =3D [] i_start_time =3D int(time.time()) s_status =3D "/{0} structs".format(str(len(l_struct))) for I in range(len(l_struct)): try: i_struct =3D I if str(l_struct[I]).strip() !=3D "": res =3D = cur.execute(l_struct[I] + ";") print(l_struct[I]) #except Warning as wrn: # print("warning: " + str(wrn.args)) except Exception as exc: l_struct_errors.append([l_struct[I], copy.copy(exc)]) finally: pass cn.commit() time.sleep(2.0) sNada =3D raw_input("hit enter to continue with data") s_status =3D "/{0} data".format(str(len(l_data))) for I in range(len(l_data)): try: #self.SetStatusText(str(I) + s_status) i_data =3D I if str(l_data[I]).strip() !=3D "": res =3D = cur.execute(l_data[I][l_data[I].index("INSERT"):] + ";") print(l_data[I][l_data[I].index("INSERT"):] + ";") except Exception as exc: l_data_errors.append([l_data[I], copy.copy(exc)]) finally: pass i_end_time =3D int(time.time()) s_time_taken =3D sTimeDiffFormat(i_start_time, i_end_time) cn.commit() cur.close() cn.close() print("cn and cur closed") fPickle =3D open("testDataErrors.pickle", "wb") pickle.dump(l_struct_errors, fPickle, 2) pickle.dump(l_data_errors, fPickle, 2) fPickle.close() print("pickled") print("MySQL Results - {0} structure queries, and {1} data = queries completed - total of {2}".format(str(i_struct), str(i_data), = s_time_taken)) print("MySQL Errors - {0} structure query errors, and {1} data = query errors".format(str(len(l_struct_errors)), = str(len(l_data_errors)))) print("Done!") sys.exit() else: print("Connection issue - There was a problem connecting to = MySQL server") sys.exit() except Exception as exc: s_exc =3D str(exc.args) #lbc.DialogShow(title=3D"errorMessage", message=3Ds_exc) print(s_exc) exc_type, exc_obj, tb =3D sys.exc_info() print(str(exc_obj)) print("line number: " + str(tb.tb_lineno)) #end of convertExport function #---end code--- If this is operating system specific, sorry, and will maybe also try = debugging code via VS.Net 2013 shortly, but, thought someone might have = an off-hand thought regarding something could try use to figure out this = issue in meantime...? TIA Jacob Kruger Blind Biker Skype: BlindZA "Roger Wilco wants to welcome you...to the space janitor's closet..." ------=_NextPart_000_001F_01D02F26.235A7D60 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Trying to run through all steps in data = conversion=20 app, and, up to last point, it's fine, but, if I try to handle direct = execution=20 of data structure, and data insertion scripts against a mySQL database, = hosted=20 locally here on same machine, running under wamp, then after code has = completely=20 finished executing everything, the command line just stops, and then I = get the=20 windows error dialogue pop up, telling me python.exe has stopped=20 working.
 
If I run the same code on my other dev = machine,=20 which might just have a slightly simpler/cleaner combination of = software, etc.=20 installed on it, then it just runs straight through, and exits python=20 interpreter instance, with no issues, and am just not sure how to try = track down=20 actual cause of this issue.
 
Here's part of the error dialogue's = detailed=20 information:

Problem signature:

Problem Event Name: APPCRASH

Application Name: python.exe

Application Version: 0.0.0.0

Application Timestamp: 4c303241

Fault Module Name: StackHash_0a9e

Fault Module Version: 0.0.0.0

Fault Module Timestamp: 00000000

Exception Code: c0000005

Exception Offset: 028e1289

OS Version: 6.1.7601.2.1.0.256.1

Locale ID: 2057

Additional Information 1: 0a9e

Additional Information 2: 0a9e372d3b4ad19135b953a78882e789

Additional Information 3: 0a9e

Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

#---end of error info---

 

If I look for something similar via = google, etc., I=20 come across some mention of 32-64 bit incompatibility, or something, = but, not=20 sure if relevant, although am working with 32 bit versions of python = 2.7, and=20 both of my dev machines are in fact 64 bit windows7 machines, but = haven't had=20 issues like this in past.

 

Also, if I exclude last part of code, = which handles=20 directly working with MySQL database, then all cooperates fine, but, am = pretty=20 sure am closing all relevant connections, cursors, etc. - here's the = last=20 function that am calling/executing, in case relevant - there is still = some=20 testing/manual debugging stuff in here, but anyway:

#---start code---

  def = convertExport(self):
   =20 try:
      f_mysql =3D open("mysql.set",=20 "rb")
      d_mysql =3D=20 pickle.load(f_mysql)
     =20 f_mysql.close()
      cn =3D=20 None
      s_host =3D=20 str(d_mysql["host"])
      s_user =3D=20 str(d_mysql["user"])
      s_pass =3D=20 str(d_mysql["password"])
      s_db =3D=20 self.s_target_value
      cn =3D=20 MySQLdb.connect(s_host, s_user, s_pass, = s_db)
     =20 if cn:
        cn.autocommit =3D=20 True
        cur =3D=20 cn.cursor()
        i_struct =3D=20 0
        i_data =3D=20 0
        f =3D = open(self.s_sql_struct_file,=20 "rb")
        s =3D=20 f.read()
       =20 f.close()
        l_struct =3D=20 s.split(";")
        f =3D=20 open(self.s_sql_data_file, = "rb")
        s=20 =3D f.read()
       =20 f.close()
        l_data =3D=20 unidecode(s).split(";")
       =20 l_struct_errors =3D []
        = l_data_errors=20 =3D []
        i_start_time =3D=20 int(time.time())
        s_status = =3D "/{0}=20 structs".format(str(len(l_struct)))
     &nbs= p; =20 for I in=20 range(len(l_struct)):
        =  =20 try:
           = ;=20 i_struct =3D=20 I
            = if=20 str(l_struct[I]).strip() !=3D "": res =3D cur.execute(l_struct[I] +=20 ";")
           = ;=20 print(l_struct[I])
        &nb= sp;=20 #except Warning as=20 wrn:
          # =20 print("warning: " +=20 str(wrn.args))
          = except=20 Exception as=20 exc:
           = ;=20 l_struct_errors.append([l_struct[I],=20 copy.copy(exc)])
         = ;=20 finally:
          &= nbsp;=20 pass
       =20 cn.commit()
       =20 time.sleep(2.0)
        sNada =3D=20 raw_input("hit enter to continue with=20 data")
        s_status =3D "/{0}=20 data".format(str(len(l_data)))
      &nb= sp; for=20 I in=20 range(len(l_data)):
        &n= bsp;=20 try:
           = ;=20 #self.SetStatusText(str(I) +=20 s_status)
          =  =20 i_data =3D = I
           =20 if str(l_data[I]).strip() !=3D "": res =3D=20 cur.execute(l_data[I][l_data[I].index("INSERT"):] +=20 ";")
           = ;=20 print(l_data[I][l_data[I].index("INSERT"):] +=20 ";")
          except = Exception=20 as = exc:
           = ;=20 l_data_errors.append([l_data[I],=20 copy.copy(exc)])
         = ;=20 finally:
          &= nbsp;=20 pass
        i_end_time =3D=20 int(time.time())
        = s_time_taken =3D=20 sTimeDiffFormat(i_start_time,=20 i_end_time)
       =20 cn.commit()
       =20 cur.close()
       =20 cn.close()
        print("cn and = cur=20 closed")
        fPickle =3D=20 open("testDataErrors.pickle",=20 "wb")
        = pickle.dump(l_struct_errors,=20 fPickle, 2)
       =20 pickle.dump(l_data_errors, fPickle,=20 2)
       =20 fPickle.close()
       =20 print("pickled")
        = print("MySQL=20 Results - {0} structure queries, and {1} data queries completed - total = of=20 {2}".format(str(i_struct), str(i_data),=20 s_time_taken))
        = print("MySQL Errors=20 - {0} structure query errors, and {1} data query=20 errors".format(str(len(l_struct_errors)),=20 str(len(l_data_errors))))
       =20 print("Done!")
       =20 sys.exit()
     =20 else:
        print("Connection = issue -=20 There was a problem connecting to MySQL=20 server")
       =20 sys.exit()
    except Exception as=20 exc:
      s_exc =3D=20 str(exc.args)
     =20 #lbc.DialogShow(title=3D"errorMessage",=20 message=3Ds_exc)
     =20 print(s_exc)
      exc_type, exc_obj, tb =3D = sys.exc_info()
     =20 print(str(exc_obj))
      print("line = number: " +=20 str(tb.tb_lineno))
  #end of convertExport function

#---end code---

 

If this is operating system specific, sorry, and = will maybe=20 also try debugging code via VS.Net 2013 shortly, but, thought someone = might have=20 an off-hand thought regarding something could try use to figure out this = issue=20 in meantime...?

 

TIA


Jacob Kruger
Blind Biker
Skype: BlindZA
"Roger Wilco = wants to=20 welcome you...to the space janitor's=20 closet..."

------=_NextPart_000_001F_01D02F26.235A7D60--