Offer amuse the problem this way:
<br> The file ProjectFormsBrowser.py method __generateDialogCode class
ProjectFormsBrowser add a change to the current directory to open a
file - 'fn' -> os.chdir (os.path.dirname (os.path.abspath (fn))) <br><br>import os
<br>
...
<br>
class ProjectFormsBrowser (ProjectBaseBrowser):
<br>
...
<br> def __generateDialogCode (self):
<br> "
<br> Private method to generate dialog code for the form (Qt4 only)
<br> "
<br> itm = self.model (). item (self.currentIndex ())
<br> fn = unicode (itm.fileName ())
<br>
<br> if self.hooks [ "generateDialogCode"] is not None:
<br> self.hooks [ "generateDialogCode"] (filename)
<br> else:
<br> from CreateDialogCodeDialog import CreateDialogCodeDialog
<br> # In 915 line add:
<br> # Change directory to local place for file "fn"
<br> os.chdir (os.path.dirname (os.path.abspath (fn)))
<br><div class="im"> dlg = CreateDialogCodeDialog (fn, self.project, self)
<br></div> if not dlg.initError ():
<br> dlg.exec_ ()<br><br>Following these changes, all is well.<br><br><br><div class="gmail_quote">10 июня 2009 г. 13:39 пользователь Сергей Гринько <span dir="ltr"><<a href="mailto:sergey.grinko@gmail.com">sergey.grinko@gmail.com</a>></span> написал:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Structure folder/files:<br><span style="font-family: courier new,monospace;">project/</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> UI/</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> widgets/</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> plugins/</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> QLineEditWErrState_plugin.py</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> __init__.py</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> qlineeditwerrstate.py</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> erredit.ui</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> __init__.py</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> Ui_erredit.py</span><br style="font-family: courier new,monospace;">
<br>if run «Ui_erredit.py» clicked «Run Script» - all Ok!<br><br>On rightclick «erredit.ui» and case «Generate Dialog Code...» errors:<br><br>Warning:<br>An unhandled exception occurred. Please report the problem<br>using the error reporting dialog or via email to <<a href="mailto:eric4-bugs@die-offenbachs.de" target="_blank">eric4-bugs@die-offenbachs.de</a>>.<br>
A log has been written to "/home/grinko/.eric4/eric4_error.log".<br>Error information:<br>--------------------------------------------------------------------------------<br>2009-06-10, 13:01:43<br>--------------------------------------------------------------------------------<br>
<type 'exceptions.ImportError'>: <br>No module named widgets.qlineeditwerrstate<br>--------------------------------------------------------------------------------<br>File "/usr/lib/python2.5/site-packages/eric4/Project/ProjectFormsBrowser.py", line 915, in __generateDialogCode<br>
dlg = CreateDialogCodeDialog(fn, self.project, self)<br>File "/usr/lib/python2.5/site-packages/eric4/Project/CreateDialogCodeDialog.py", line 92, in __init__<br>self.__updateSlotsModel()<br>File "/usr/lib/python2.5/site-packages/eric4/Project/CreateDialogCodeDialog.py", line 163, in __updateSlotsModel<br>
dlg = uic.loadUi(self.formFile)<br>File "/usr/lib/python2.5/site-packages/PyQt4/uic/__init__.py", line 106, in loadUi<br>return loader.DynamicUILoader().loadUi(uifile, baseinstance)<br>File "/usr/lib/python2.5/site-packages/PyQt4/uic/Loader/loader.py", line 22, in loadUi<br>
return self.parse(filename)<br>File "/usr/lib/python2.5/site-packages/PyQt4/uic/uiparser.py", line 690, in parse<br>actor(elem)<br>File "/usr/lib/python2.5/site-packages/PyQt4/uic/uiparser.py", line 538, in createUserInterface<br>
self.traverseWidgetTree(elem)<br>File "/usr/lib/python2.5/site-packages/PyQt4/uic/uiparser.py", line 516, in traverseWidgetTree<br>handler(self, child)<br>File "/usr/lib/python2.5/site-packages/PyQt4/uic/uiparser.py", line 163, in createWidget<br>
self.traverseWidgetTree(elem)<br>File "/usr/lib/python2.5/site-packages/PyQt4/uic/uiparser.py", line 516, in traverseWidgetTree<br>handler(self, child)<br>File "/usr/lib/python2.5/site-packages/PyQt4/uic/uiparser.py", line 163, in createWidget<br>
self.traverseWidgetTree(elem)<br>File "/usr/lib/python2.5/site-packages/PyQt4/uic/uiparser.py", line 516, in traverseWidgetTree<br>handler(self, child)<br>File "/usr/lib/python2.5/site-packages/PyQt4/uic/uiparser.py", line 320, in createLayout<br>
self.traverseWidgetTree(elem)<br>File "/usr/lib/python2.5/site-packages/PyQt4/uic/uiparser.py", line 516, in traverseWidgetTree<br>handler(self, child)<br>File "/usr/lib/python2.5/site-packages/PyQt4/uic/uiparser.py", line 340, in handleItem<br>
self.traverseWidgetTree(elem)<br>File "/usr/lib/python2.5/site-packages/PyQt4/uic/uiparser.py", line 516, in traverseWidgetTree<br>handler(self, child)<br>File "/usr/lib/python2.5/site-packages/PyQt4/uic/uiparser.py", line 320, in createLayout<br>
self.traverseWidgetTree(elem)<br>File "/usr/lib/python2.5/site-packages/PyQt4/uic/uiparser.py", line 516, in traverseWidgetTree<br>handler(self, child)<br>File "/usr/lib/python2.5/site-packages/PyQt4/uic/uiparser.py", line 340, in handleItem<br>
self.traverseWidgetTree(elem)<br>File "/usr/lib/python2.5/site-packages/PyQt4/uic/uiparser.py", line 516, in traverseWidgetTree<br>handler(self, child)<br>File "/usr/lib/python2.5/site-packages/PyQt4/uic/uiparser.py", line 157, in createWidget<br>
self.stack.push(self.setupObject(widgetClass(elem), parent, elem))<br>File "/usr/lib/python2.5/site-packages/PyQt4/uic/uiparser.py", line 130, in setupObject<br>obj = self.factory.createQObject(clsname, name, args, is_attribute)<br>
File "/usr/lib/python2.5/site-packages/PyQt4/uic/objcreator.py", line 64, in createQObject<br>classType = self.findQObjectType(classname)<br>File "/usr/lib/python2.5/site-packages/PyQt4/uic/objcreator.py", line 74, in findQObjectType<br>
w = module.search(classname)<br>File "/usr/lib/python2.5/site-packages/PyQt4/uic/Loader/qobjectcreator.py", line 50, in search<br>self._modules[module] = __import__(module, {}, {}, (cls,))<br>--------------------------------------------------------------------------------<br>
Version Numbers:<br>Python 2.5.2<br>Qt 4.4.3<br>PyQt4 4.4.4<br>sip 4.7.9<br>QScintilla 2.2<br>eric4 4.3.4 (r3192)<br>Platform: linux2<br>2.5.2 (r252:60911, Sep 29 2008, 21:10:35) <br>[GCC 4.3.2]<br>--------------------------------------------------------------------------------<br>
Plugins Version Numbers:<br>PluginAbout 4.3.0<br>PluginAssistantEric 1.2.1<br>PluginCharTables 4.1.4<br>PluginCxFreeze 4.2.0<br>PluginEricapi 4.3.0<br>PluginEricdoc 4.3.0<br>PluginProjectDjango 2.1.0<br>PluginProjectPylons 1.0.0<br>
PluginProjectTurboGears 1.0.5<br>PluginProjectWxPython 1.0.3<br>PluginPyLint 4.1.3<br>PluginRefactoringRope 1.1.5<br>PluginSyntaxChecker 4.2.0<br>PluginTabnanny 4.2.0<br>PluginVcsCVS 4.1.11<br>PluginVcsPySvn 4.3.0<br>PluginVcsSubversion 4.3.0<br>
PluginVmListspace 4.2.0<br>PluginVmMdiArea 1.0.0<br>PluginVmTabview 4.3.0<br>PluginVmWorkspace 4.2.0<br>PluginWizardPyRegExp 4.2.0<br>PluginWizardQColorDialog 4.2.0<br>PluginWizardQFileDialog 4.2.0<br>PluginWizardQFontDialog 4.2.0<br>
PluginWizardQInputDialog 4.2.0<br>PluginWizardQMessageBox 4.2.0<br>PluginWizardQRegExp 4.2.0<br><br><br>
</blockquote></div><br><br clear="all"><br>-- <br>С уважением Гринько Сергей<br>Email: <a href="mailto:sergey.grinko@gmail.com">sergey.grinko@gmail.com</a><br>