[Sidefx-houdini-list] Was: Coding for Hou in Sublime Text. Now: PyQt

Lars van der Bijl com48com at gmail.com
Wed Jan 30 03:23:41 EST 2013


try
os.path.abspath()
in your loadUiType


On Wed, Jan 30, 2013 at 1:52 AM, Nico Dufort <ndufort at gmail.com> wrote:

> >
> > IOError: [Errno 2] No such file or directory: './ui/MainWindow.ui'
>
>
> Not near Houdini, but the above states that it cannot find a directory
> called "ui" with a "MainWindow.ui" file in it *at the level your code is
> running*.
>
> The code needs to be updated to point to the file on your system.  It is
> currently using a relative path in the form of "./thisfolder/thatfile", and
> if you are not calling your code from that location, it won't find the
> directory.  You need a more explicit path so the code can be run from
> anywhere and always find the files.
>
> Hope this helps a bit.
>
> On Tue, Jan 29, 2013 at 4:38 PM, Gene Crucean
> <emailgeneonthelist at gmail.com>wrote:
>
> > Sorry for all the emails today :(
> >
> > Would someone mind showing me what kind of noob mistake I'm making with
> > this simple setup? The main difference between this version and the
> example
> > from the docs (which works fine, though loaded from a shelf tool... not a
> > module) is that this one uses uic to load the interface.
> >
> > http://dl.dropbox.com/u/403879/SimplePyQtWindow.zat the level your code
> is
> > runningip <http://dl.dropbox.com/u/403879/SimplePyQtWindow.zip>
> >
> > So I know this is wrong but I'm running this from the python shell simply
> > with "import foo" (I'm more of a C++ / Objective-C guy hehe)
> >
> > And I get this:
> >
> > Loading ui file: ui\MainWindow.ui
> > Traceback (most recent call last):
> >   File "<console>", line 1, in <module>
> >   File "\\te\trs\PluginRepo\houdini12.1\pythonModules\foo.py", line 21,
> in
> > <module>
> >     form_class, base_class = uic.loadUiType(uiPath)
> >   File
> >
> >
> "C:\PROGRA~1\SIDEEF~1\HOUDIN~1.185\python26\lib\site-packages\PyQt4\uic\__init__.py",
> > line 200, in loadUiType
> >     winfo = compiler.UICompiler().compileUi(uifile, code_string,
> > from_imports)
> >   File
> >
> >
> "C:\PROGRA~1\SIDEEF~1\HOUDIN~1.185\python26\lib\site-packages\PyQt4\uic\Compiler\compiler.py",
> > line 119, in compileUi
> >     w = self.parse(input_stream)
> >   File
> >
> >
> "C:\PROGRA~1\SIDEEF~1\HOUDIN~1.185\python26\lib\site-packages\PyQt4\uic\uiparser.py",
> > line 871, in parse
> >     document = parse(filename)
> >   File
> >
> "C:\PROGRA~1\SIDEEF~1\HOUDIN~1.185\python26\lib\xml\etree\ElementTree.py",
> > line 862, in parse
> >     tree.parse(source, parser)
> >   File
> >
> "C:\PROGRA~1\SIDEEF~1\HOUDIN~1.185\python26\lib\xml\etree\ElementTree.py",
> > line 579, in parse
> >     source = open(source, "rb")
> > IOError: [Errno 2] No such file or directory: './ui/MainWindow.ui'
> >
> >
> > On Tue, Jan 29, 2013 at 2:51 PM, Gene Crucean
> > <emailgeneonthelist at gmail.com>wrote:
> >
> > > Got it working. Silly mistake. Thanks for all the help guys!
> > >
> > >
> > > On Tue, Jan 29, 2013 at 2:17 PM, Gene Crucean <
> > > emailgeneonthelist at gmail.com> wrote:
> > >
> > >> Hmm, I can get the window to show up now using the sample code from
> the
> > >> docs (the simple font dialog example. 1st one) but it hangs and quits
> > >> Houdini.
> > >>
> > >> Does anyone have an idea of what might be causing it? Maybe the wrong
> > >> version of pyqt? I'm using PyQt-Py2.6-x64-gpl-4.9.5-1.exe and it looks
> > like
> > >> the version of python in Houdini is 2.6.4... so maybe that's not it.
> > >>
> > >>
> > >>
> > >>
> > >> On Tue, Jan 29, 2013 at 10:24 AM, Gene Crucean <
> > >> emailgeneonthelist at gmail.com> wrote:
> > >>
> > >>> Haha <slaps hand on forehead> awesome. Thanks Nico!
> > >>>
> > >>>
> > >>> On Tue, Jan 29, 2013 at 10:03 AM, Nico Dufort <ndufort at gmail.com>
> > wrote:
> > >>>
> > >>>> Gene, would this be the type of thing you were looking for?
> > >>>>
> > >>>> http://www.sidefx.com/docs/houdini12.0/hom/cookbook/pyqt/
> > >>>>
> > >>>> On Tue, Jan 29, 2013 at 9:49 AM, Gene Crucean
> > >>>> <emailgeneonthelist at gmail.com>wrote:
> > >>>>
> > >>>> > Now were talkin' guys!
> > >>>> >
> > >>>> > Do you have any working (preferably simple or starting point) pyqt
> > >>>> scripts?
> > >>>> > I'm wondering how to anchor it to Houdini and just get a simple
> > >>>> window to
> > >>>> > show up.
> > >>>> >
> > >>>> > Love this list. Thanks guys.
> > >>>> >
> > >>>> >
> > >>>> > On Mon, Jan 28, 2013 at 10:42 PM, Никита Мусатов <
> > >>>> not.a.whale at gmail.com
> > >>>> > >wrote:
> > >>>> >
> > >>>> > > I wrote guide about Sublime and Houdini + PyQt4. I think it can
> be
> > >>>> > helpful.
> > >>>> > >
> > >>>> > >
> > >>>> >
> > >>>>
> >
> http://notawhale.wordpress.com/2013/01/26/the-guide-sublime-text-2-for-houdini-pyqt4/
> > >>>> > >
> > >>>> > > On Jan 28, 2013 9:56 PM, "Gene Crucean" <
> > >>>> emailgeneonthelist at gmail.com>
> > >>>> > > wrote:
> > >>>> > >
> > >>>> > > > Yes that's wonderful. Thanks Lars!
> > >>>> > > >
> > >>>> > > >
> > >>>> > > > On Mon, Jan 28, 2013 at 4:42 AM, Lars van der Bijl <
> > >>>> com48com at gmail.com
> > >>>> > > > >wrote:
> > >>>> > > >
> > >>>> > > > > Gene I had a minute. did you mean something like this?
> > >>>> > > > >
> > >>>> > > > > https://github.com/com48/HoudiniSublime
> > >>>> > > > >
> > >>>> > > > >
> > >>>> > > > >
> > >>>> > > > >
> > >>>> > > > > On Wed, Jan 23, 2013 at 5:49 PM, Gene Crucean
> > >>>> > > > > <emailgeneonthelist at gmail.com>wrote:
> > >>>> > > > >
> > >>>> > > > > > Yeah I have that package installed. I have it working on
> > >>>> OSX... but
> > >>>> > > I'm
> > >>>> > > > > > sure it's just something silly I'm doing wrong on Windows.
> > >>>> > > > > >
> > >>>> > > > > >
> > >>>> > > > > > On Wed, Jan 23, 2013 at 8:37 AM, Никита Мусатов <
> > >>>> > > not.a.whale at gmail.com
> > >>>> > > > > > >wrote:
> > >>>> > > > > >
> > >>>> > > > > > > I work on Linux, and tested it on other OS. Are you
> > install
> > >>>> > > > > > > SulblimeCodeInter?
> > >>>> > > > > > > On Jan 23, 2013 8:11 PM, "Gene Crucean" <
> > >>>> > > > emailgeneonthelist at gmail.com>
> > >>>> > > > > > > wrote:
> > >>>> > > > > > >
> > >>>> > > > > > > > Ugh, I can't stand when people reply to questions like
> > >>>> that
> > >>>> > with
> > >>>> > > > "Why
> > >>>> > > > > > > don't
> > >>>> > > > > > > > you just use VIM". These are some of the reasons why:
> > >>>> > > > > > > >
> > http://darkvertex.com/wp/2012/05/30/i-love-sublimetext2/
> > >>>> > > > > > > >
> > >>>> > > > > > > > However, thanks for the info guys. Никита's reply
> seems
> > >>>> to be
> > >>>> > > > working
> > >>>> > > > > > on
> > >>>> > > > > > > > OSX for some autocomplete python for now, but not on
> > Win.
> > >>>> Not
> > >>>> > > sure
> > >>>> > > > > why.
> > >>>> > > > > > > >
> > >>>> > > > > > > >
> > >>>> > > > > > > > On Wed, Jan 23, 2013 at 4:31 AM, Brett Harrison <
> > >>>> > > > > > > bretttharrison at gmail.com
> > >>>> > > > > > > > >wrote:
> > >>>> > > > > > > >
> > >>>> > > > > > > > > There's a bit of conversation from a while back at
> > >>>> > odforce.net
> > >>>> > > > > > > > >
> > >>>> > > > > > > > >
> > >>>> > > > > >
> > >>>> > >
> > >>>>
> http://forums.odforce.net/index.php?/topic/11364-sublime-text-editor/
> > >>>> > > > > > > > >
> > >>>> > > > > > > > > On Sun, Jan 20, 2013 at 6:03 AM, Никита Мусатов <
> > >>>> > > > > > not.a.whale at gmail.com
> > >>>> > > > > > > > > >wrote:
> > >>>> > > > > > > > >
> > >>>> > > > > > > > > > Hi! I'm only for python added code for
> autocomplete
> > in
> > >>>> > > > > > > > .codeintel/config:
> > >>>> > > > > > > > > > {
> > >>>> > > > > > > > > >     "Python": {
> > >>>> > > > > > > > > >         "python": '/usr/bin/python',
> > >>>> > > > > > > > > >         "pythonExtraPaths":
> > >>>> > > > > > > ['/opt/hfs12.1.185/houdini/python2.6libs/']
> > >>>> > > > > > > > > >     }
> > >>>> > > > > > > > > > }
> > >>>> > > > > > > > > >
> > >>>> > > > > > > > > >
> > >>>> > > > > > > > > >
> > >>>> > > > > > > > > > 2013/1/19 Gene Crucean <
> > emailgeneonthelist at gmail.com>
> > >>>> > > > > > > > > >
> > >>>> > > > > > > > > > > Has anyone done anything in regards to getting
> > >>>> Houdini
> > >>>> > > setup
> > >>>> > > > > for
> > >>>> > > > > > > > proper
> > >>>> > > > > > > > > > > coding with Sublime Text?
> > >>>> > > > > > > > > > >
> > >>>> > > > > > > > > > > It would be amazing to have this type of setup
> but
> > >>>> for
> > >>>> > Hou:
> > >>>> > > > > > > > > > > http://www.dannywynne.com/blog/?p=66
> > >>>> > > > > > > > > > >
> > >>>> > > > > > > > > > >
> > >>>> > > > > > > > > > >
> > >>>> > > > > > > > > > > --
> > >>>> > > > > > > > > > > Gene Crucean - Emmy winning - Oscar nominated
> VFX
> > >>>> > > Supervisor
> > >>>> > > > /
> > >>>> > > > > > > > iOS-OSX
> > >>>> > > > > > > > > > > Developer / Filmmaker / Photographer
> > >>>> > > > > > > > > > > ** *Freelance for hire* **
> > >>>> > > > > > > > > > > www.genecrucean.com
> > >>>> > > > > > > > > > >
> > >>>> > > > > > > > > > > ~~ Please use my website's contact form on
> > >>>> > > > > www.genecrucean.comfor
> > >>>> > > > > > > > any
> > >>>> > > > > > > > > > > personal emails. Thanks. I may not get them at
> > this
> > >>>> > > address.
> > >>>> > > > ~~
> > >>>> > > > > > > > > > > _______________________________________________
> > >>>> > > > > > > > > > > Sidefx-houdini-list mailing list
> > >>>> > > > > > > > > > > Sidefx-houdini-list at sidefx.com
> > >>>> > > > > > > > > > >
> > >>>> > > > > >
> > >>>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> > >>>> > > > > > > > > > >
> > >>>> > > > > > > > > > _______________________________________________
> > >>>> > > > > > > > > > Sidefx-houdini-list mailing list
> > >>>> > > > > > > > > > Sidefx-houdini-list at sidefx.com
> > >>>> > > > > > > > > >
> > >>>> > > > >
> > >>>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> > >>>> > > > > > > > > >
> > >>>> > > > > > > > > _______________________________________________
> > >>>> > > > > > > > > Sidefx-houdini-list mailing list
> > >>>> > > > > > > > > Sidefx-houdini-list at sidefx.com
> > >>>> > > > > > > > >
> > >>>> > > >
> > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> > >>>> > > > > > > > >
> > >>>> > > > > > > >
> > >>>> > > > > > > >
> > >>>> > > > > > > >
> > >>>> > > > > > > > --
> > >>>> > > > > > > > Gene Crucean - Emmy winning - Oscar nominated VFX
> > >>>> Supervisor /
> > >>>> > > > > iOS-OSX
> > >>>> > > > > > > > Developer / Filmmaker / Photographer
> > >>>> > > > > > > > ** *Freelance for hire* **
> > >>>> > > > > > > > www.genecrucean.com
> > >>>> > > > > > > >
> > >>>> > > > > > > > ~~ Please use my website's contact form on
> > >>>> > www.genecrucean.comfor
> > >>>> > > > > any
> > >>>> > > > > > > > personal emails. Thanks. I may not get them at this
> > >>>> address. ~~
> > >>>> > > > > > > > _______________________________________________
> > >>>> > > > > > > > Sidefx-houdini-list mailing list
> > >>>> > > > > > > > Sidefx-houdini-list at sidefx.com
> > >>>> > > > > > > >
> > >>>> > >
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> > >>>> > > > > > > >
> > >>>> > > > > > > _______________________________________________
> > >>>> > > > > > > Sidefx-houdini-list mailing list
> > >>>> > > > > > > Sidefx-houdini-list at sidefx.com
> > >>>> > > > > > >
> > >>>> > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> > >>>> > > > > > >
> > >>>> > > > > >
> > >>>> > > > > >
> > >>>> > > > > >
> > >>>> > > > > > --
> > >>>> > > > > > Gene Crucean - Emmy winning - Oscar nominated VFX
> > Supervisor /
> > >>>> > > iOS-OSX
> > >>>> > > > > > Developer / Filmmaker / Photographer
> > >>>> > > > > > ** *Freelance for hire* **
> > >>>> > > > > > www.genecrucean.com
> > >>>> > > > > >
> > >>>> > > > > > ~~ Please use my website's contact form on
> > >>>> www.genecrucean.com for
> > >>>> > > any
> > >>>> > > > > > personal emails. Thanks. I may not get them at this
> address.
> > >>>> ~~
> > >>>> > > > > > _______________________________________________
> > >>>> > > > > > Sidefx-houdini-list mailing list
> > >>>> > > > > > Sidefx-houdini-list at sidefx.com
> > >>>> > > > > >
> > >>>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> > >>>> > > > > >
> > >>>> > > > > _______________________________________________
> > >>>> > > > > Sidefx-houdini-list mailing list
> > >>>> > > > > Sidefx-houdini-list at sidefx.com
> > >>>> > > > >
> > >>>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> > >>>> > > > >
> > >>>> > > >
> > >>>> > > >
> > >>>> > > >
> > >>>> > > > --
> > >>>> > > > Gene Crucean - Emmy winning - Oscar nominated VFX Supervisor /
> > >>>> iOS-OSX
> > >>>> > > > Developer / Filmmaker / Photographer
> > >>>> > > > ** *Freelance for hire* **
> > >>>> > > > www.genecrucean.com
> > >>>> > > >
> > >>>> > > > ~~ Please use my website's contact form on
> > www.genecrucean.comfor any
> > >>>> > > > personal emails. Thanks. I may not get them at this address.
> ~~
> > >>>> > > > _______________________________________________
> > >>>> > > > Sidefx-houdini-list mailing list
> > >>>> > > > Sidefx-houdini-list at sidefx.com
> > >>>> > > >
> > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> > >>>> > > >
> > >>>> > > _______________________________________________
> > >>>> > > Sidefx-houdini-list mailing list
> > >>>> > > Sidefx-houdini-list at sidefx.com
> > >>>> > >
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> > >>>> > >
> > >>>> >
> > >>>> >
> > >>>> >
> > >>>> > --
> > >>>> > Gene Crucean - Emmy winning - Oscar nominated VFX Supervisor /
> > iOS-OSX
> > >>>> > Developer / Filmmaker / Photographer
> > >>>> > ** *Freelance for hire* **
> > >>>> > www.genecrucean.com
> > >>>> >
> > >>>> > ~~ Please use my website's contact form on www.genecrucean.comfor
> > >>>> any
> > >>>> > personal emails. Thanks. I may not get them at this address. ~~
> > >>>> > _______________________________________________
> > >>>> > Sidefx-houdini-list mailing list
> > >>>> > Sidefx-houdini-list at sidefx.com
> > >>>> > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> > >>>> >
> > >>>>
> > >>>>
> > >>>>
> > >>>> --
> > >>>> "Attention, attention. Here and now, boys," the mynah repeated.
> "Here
> > >>>> and
> > >>>> now, boys."
> > >>>> _______________________________________________
> > >>>> Sidefx-houdini-list mailing list
> > >>>> Sidefx-houdini-list at sidefx.com
> > >>>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> > >>>>
> > >>>
> > >>>
> > >>>
> > >>> --
> > >>> Gene Crucean - Emmy winning - Oscar nominated VFX Supervisor /
> iOS-OSX
> > >>> Developer / Filmmaker / Photographer
> > >>> ** *Freelance for hire* **
> > >>> www.genecrucean.com
> > >>>
> > >>> ~~ Please use my website's contact form on www.genecrucean.com for
> any
> > >>> personal emails. Thanks. I may not get them at this address. ~~
> > >>>
> > >>
> > >>
> > >>
> > >> --
> > >> Gene Crucean - Emmy winning - Oscar nominated VFX Supervisor / iOS-OSX
> > >> Developer / Filmmaker / Photographer
> > >> ** *Freelance for hire* **
> > >> www.genecrucean.com
> > >>
> > >> ~~ Please use my website's contact form on www.genecrucean.com for
> any
> > >> personal emails. Thanks. I may not get them at this address. ~~
> > >>
> > >
> > >
> > >
> > > --
> > > Gene Crucean - Emmy winning - Oscar nominated VFX Supervisor / iOS-OSX
> > > Developer / Filmmaker / Photographer
> > > ** *Freelance for hire* **
> > > www.genecrucean.com
> > >
> > > ~~ Please use my website's contact form on www.genecrucean.com for any
> > > personal emails. Thanks. I may not get them at this address. ~~
> > >
> >
> >
> >
> > --
> > Gene Crucean - Emmy winning - Oscar nominated VFX Supervisor / iOS-OSX
> > Developer / Filmmaker / Photographer
> > ** *Freelance for hire* **
> > www.genecrucean.com
> >
> > ~~ Please use my website's contact form on www.genecrucean.com for any
> > personal emails. Thanks. I may not get them at this address. ~~
> > _______________________________________________
> > Sidefx-houdini-list mailing list
> > Sidefx-houdini-list at sidefx.com
> > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> >
>
>
>
> --
> "Attention, attention. Here and now, boys," the mynah repeated. "Here and
> now, boys."
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>



More information about the Sidefx-houdini-list mailing list