PythoncadBugTraker item #3097630, was opened at 2010-10-28 12:49 Message generated for change (Settings changed) made by matteoboscolo You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1128790&aid=3097630&group_id=263167
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed Resolution: Works For Me Priority: 5 Private: No Submitted By: carlopav (carlopav) Assigned to: Matteo Boscolo (matteoboscolo) Summary: import file crashes under ubuntu 10.10 Initial Comment: hi, the import command still causes pycad to crash under ubuntu 10.10 bug seems to be in cadwindow.py row 356 carlo ---------------------------------------------------------------------- Comment By: Matteo Boscolo (matteoboscolo) Date: 2011-01-16 23:03 Message: is this bug still open ? ---------------------------------------------------------------------- Comment By: Matteo Boscolo (matteoboscolo) Date: 2010-10-29 22:39 Message: it seems a problem with the self.mdiArea.activeSubWindow() that is None . It seems that you do not have any active drawing ..opened .. witch version of pyqt are you using ? dose the open file with dxf extension works well ? we can manage this error controlling the code like this: def _onImportDrawing(self): drawing = QtGui.QFileDialog.getOpenFileName(parent=self, caption="Import Drawing", directory=self.lastDirectory, filter="Dxf (*.dxf)"); # open a document and load the drawing if len(drawing)>0: self.lastDirectory=os.path.split(drawing)[0] if self.mdiArea.activeSubWindow() != None: self.mdiArea.activeSubWindow()importExternalFormat(drawing) else: print "active sub windows is none" return but I do not think that you can open a dxf file anymore :-) Regards, Matteo ---------------------------------------------------------------------- Comment By: carlopav (carlopav) Date: 2010-10-29 12:31 Message: def _onImportDrawing(self): drawing = QtGui.QFileDialog.getOpenFileName(parent=self, caption="Import Drawing", directory=self.lastDirectory, filter="Dxf (*.dxf)"); # open a document and load the drawing if len(drawing)>0: self.lastDirectory=os.path.split(drawing)[0] self.mdiArea.activeSubWindow().importExternalFormat(drawing) <<<<<<<<<<<<<it crashes here return saying "unhandled attribute error" none type object has no attribute "importExternalFormat" regards carlo ---------------------------------------------------------------------- Comment By: Matteo Boscolo (matteoboscolo) Date: 2010-10-28 21:26 Message: could you post part of the code Regards, Matteo ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1128790&aid=3097630&group_id=263167 ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ Pythoncad-developer mailing list Pythoncad-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pythoncad-developer