I think I've mentioned I'm trying to build a package for PyMSNt
in the PKGSRC system (to be found at http://www.pkgsrc.org.)

I got it all installed in a system directory, and when started
from twistd, it now finds the configuration file correctly.
(yeah!)

But, on start up, it exits almost immediately with an
application error.

"Failed to load application: [Errno 2] No such file or directory: 
'src/legacy/defaultJabberAvatar.png'"

The offending code appears to be in legacy/glue.py.  I'm
suspecting that the file request really should be relative to
"PATH" (as defined in PyMSNt.tac), or relative to the current
working directory (``legacy/defaultJabberAvatar.png'')

Yup, making that change allowed it to start without any
problems.  The patch is:

--- src/legacy/glue.py.orig     2005-11-01 23:55:29.000000000 -0600
+++ src/legacy/glue.py
@@ -27,7 +27,7 @@ id = "msn"               # The transport
 
 
 # Load the default avatar
-f = open("src/legacy/defaultJabberAvatar.png")
+f = open("legacy/defaultJabberAvatar.png")
 defaultJabberAvatarData = f.read()
 f.close()
 

Now to see if I can actually connect to MSN.. I expect so,
having heard otherwise good things about PyMSNt for quite a
while!

Look for py-jabber-msnt to arrive in pkgsrc-wip.sf.net within
the hour! (for version 0.10.2)

--
Eric Schnoebelen                [EMAIL PROTECTED]               
http://www.cirr.com
    "This is an important announcement.  This is flight 121 to Los Angeles.
    If your travel plans today do not include Los Angeles, now would be a
    perfect time to disembark." - _So_Long_And_Thanks_For_All_The_Fish_
From [EMAIL PROTECTED]  Sat Nov  5 03:38:03 2005
From: [EMAIL PROTECTED] (James Bunton)
Date: Sat Nov  5 03:38:06 2005
Subject: [py-transports] PyMSNt: another nit: default avatar path hard
        coded
In-Reply-To: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>

If you're running the transport with twistd, then the working directory 
is indeed the PATH variable in PyMSNt.tac

If you're running the program with python directly, then you should not 
be in the src/ directory when running.

cd /usr/local/PyMSNt
python src/main.py

That will start it correctly, with /usr/local/PyMSNt as the working 
directory.

---

James



On 05/11/2005, at 12:59 PM, Eric Schnoebelen wrote:

>
> I think I've mentioned I'm trying to build a package for PyMSNt
> in the PKGSRC system (to be found at http://www.pkgsrc.org.)
>
> I got it all installed in a system directory, and when started
> from twistd, it now finds the configuration file correctly.
> (yeah!)
>
> But, on start up, it exits almost immediately with an
> application error.
>
> "Failed to load application: [Errno 2] No such file or directory: 
> 'src/legacy/defaultJabberAvatar.png'"
>
> The offending code appears to be in legacy/glue.py.  I'm
> suspecting that the file request really should be relative to
> "PATH" (as defined in PyMSNt.tac), or relative to the current
> working directory (``legacy/defaultJabberAvatar.png'')
>
> Yup, making that change allowed it to start without any
> problems.  The patch is:
>
> --- src/legacy/glue.py.orig   2005-11-01 23:55:29.000000000 -0600
> +++ src/legacy/glue.py
> @@ -27,7 +27,7 @@ id = "msn"               # The transport
>
>
>  # Load the default avatar
> -f = open("src/legacy/defaultJabberAvatar.png")
> +f = open("legacy/defaultJabberAvatar.png")
>  defaultJabberAvatarData = f.read()
>  f.close()
>
>
> Now to see if I can actually connect to MSN.. I expect so,
> having heard otherwise good things about PyMSNt for quite a
> while!
>
> Look for py-jabber-msnt to arrive in pkgsrc-wip.sf.net within
> the hour! (for version 0.10.2)
>
> --
> Eric Schnoebelen              [EMAIL PROTECTED]               
> http://www.cirr.com
>     "This is an important announcement.  This is flight 121 to Los 
> Angeles.
>     If your travel plans today do not include Los Angeles, now would 
> be a
>     perfect time to disembark." - _So_Long_And_Thanks_For_All_The_Fish_
> _______________________________________________
> py-transports mailing list
> py-transports@blathersource.org
> http://www.modevia.com/cgi-bin/mailman/listinfo/py-transports
>

Reply via email to