Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #53807
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2013-09-06 12:28 -0700 |
| References | <8e84343f-1eff-4ed4-bfa7-aaf5755b5114@googlegroups.com> <b8ub8oFelgnU1@mid.individual.net> <3d5be177-cda2-4612-9117-a2ed9a448f6d@googlegroups.com> <mailman.132.1378493422.5461.python-list@python.org> |
| Message-ID | <1fcd9616-adeb-4184-aeca-92038841fb3b@googlegroups.com> (permalink) |
| Subject | Re: how to trouble shoot - RuntimeError: Open Failed |
| From | stas poritskiy <stascrash@gmail.com> |
Guys, as i was writing a very detailed message with code samples, following the guide that Steven linked, i found the problem. a pretty lame one, actually. in my class that was processing the images, i created an object instance, via __INIT__ , self.data = attributes() but i was iterating through list of folders, so object was filled with the correct data, but it was never re-initialized for the new one. i move my objects into a function, and called the function on each loop-start, so objects are re-created and re-filled with the data. Terry, yeah, your confusion was right, and pointing out that i was supposed to get IOError. that lead me to inspect code again and again :) anyways, thanks and sorry for the mess ) On Friday, September 6, 2013 1:49:57 PM UTC-5, Terry Reedy wrote: > On 9/6/2013 1:05 PM, stas poritskiy wrote: > > > The code in development is mine, and i am using the API provided by a main developer. > > > > > > At the moment, i am not using any try/except functionality. > > > > > > here is the full Exception output: > > > [CODE] > > > Exception in Tkinter callback > > > Traceback (most recent call last): > > > File "C:\Python27\32bit\lib\lib-tk\Tkinter.py", line 1470, in __call__ > > > return self.func(*args) > > > File "E:\sporitskiy\HON\Project\scene7\s7operator\gui.py", line 59, in <lambda> > > > cmd1 = lambda: vntProcessor.colData(folders.path, folders.subFolders) > > > File "E:\sporitskiy\HON\Project\scene7\s7operator\vntProcessor.py", line 184, in colData > > > setVars() > > > File "E:\sporitskiy\HON\Project\scene7\s7operator\vntProcessor.py", line 79, in __call__ > > > self.batchFiles() > > > File "E:\sporitskiy\HON\Project\scene7\s7operator\vntProcessor.py", line 55, in batchFiles > > > self.vntConnect.createVNTobjects(self.vntObjMgroup.keyList, self.vntLtoF.keyValList, self.vntObjFile.keyList, myPath) > > > File "E:\sporitskiy\HON\Project\scene7\s7operator\vntProcessor.py", line 113, in createVNTobjects > > > self.createImage(groupName, layerName, fileName, imagePath, self.vntGroups) > > > File "E:\sporitskiy\HON\Project\scene7\s7operator\vntProcessor.py", line 137, in createImage > > > img = open_image(imageFile) > > > File "<string>", line 2, in open_image > > > File "C:\Python27\32bit\lib\site-packages\s7vampy\arg_validator.py", line 213, in __call__ > > > return func(*args, **keywords) > > > File "C:\Python27\32bit\lib\site-packages\s7vampy\image.py", line 181, in open_image > > > return Image(_S7VAM_IMAGE.Open(filename)) > > > RuntimeError: Open Failed: 'C:/Users/sporitskiy/Desktop/Practice/HIWM2MSB/hiwm2mpa_upholstery_esq_leather_ro_12_0001.tif' > > > > We were confused because the failed open should be an IOError. If Image > > is indeed converting such to RuntimeError, it should not. It should just > > let the original error bubble up. It is possibly tossing information in > > the process. The first thing I would do is to look at the code around > > that line in image.py and remove the exception replacement if there is one. > > > > -- > > Terry Jan Reedy
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
how to trouble shoot - RuntimeError: Open Failed stas poritskiy <stascrash@gmail.com> - 2013-09-06 08:00 -0700
Re: how to trouble shoot - RuntimeError: Open Failed Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-06 15:27 +0000
Re: how to trouble shoot - RuntimeError: Open Failed Neil Cerutti <neilc@norwich.edu> - 2013-09-06 15:39 +0000
Re: how to trouble shoot - RuntimeError: Open Failed stas poritskiy <stascrash@gmail.com> - 2013-09-06 10:05 -0700
Re: how to trouble shoot - RuntimeError: Open Failed Terry Reedy <tjreedy@udel.edu> - 2013-09-06 14:49 -0400
Re: how to trouble shoot - RuntimeError: Open Failed stas poritskiy <stascrash@gmail.com> - 2013-09-06 12:28 -0700
csiph-web