@mdipierro - Do you mean do I have multiple versions of Python on my
system?
$ ls usr/bin/ shows ->
...
-rwxr-xr-x 1 root root 82 Jul 10 2008 pydoc
-rwxr-xr-x 1 root root 3572 Jul 10 2008 python
lrwxrwxrwx 1 root root 16 Nov 27 2009 python-config ->
python2.5-config
lrwxrwxrwx 1 root root 6 Nov 27 2009 python2 -> python
-rwxr-xr-x 1 root root 3572 Jul 10 2008 python2.5
-rwxr-xr-x 1 root root 1418 Jul 10 2008 python2.5-config
but all of these refer to version Python2.5.1
Moreover, I know that that error is thrown from web2py/gluon.tools.py
3285 try:
3286 import pyamf
3287 import pyamf.remoting.gateway
3288 except:
3289 return "pyamf not installed or not in Python
sys.path"
but when I run from the command line...
$ python
>>>> import pyamf
>>>> import pyamf.remoting.gateway
...I get no errors
I'm stumped- Is this a permissions issue? What else can I test?
My code:
rpc.py:
# coding: utf8
# try something like
def index(): return dict(message="hello from rpc.py")
from gluon.tools import Service
service = Service(globals())
def call():
session.forget()
return service()
@service.amfrpc3("mydomain")
def test():
return "Test!!!"
Flex client code: (Doubt it's helpful as this seems like a server, not
client, issue)
<mx:RemoteObject
id="amfService"
endpoint="http://{myPublicIP}/pyamf_test/rpc/call/amfrpc3"
destination="mydomain"
showBusyCursor="true">
<mx:method name="test"
result="resultHandler(event)" fault="faultHandler(event)"
/>
</mx:RemoteObject>
And a side question: What is the purpose of the domain field? Can it
be anything?
@Kuba - How am I supposed to reboot web2py when it's running off of
mod_wsgi? I haven't figured that out yet- thought that since it was
tied in with Apache an Apache restart would reboot web2py too.
However, I went so far as to reboot the whole system, so don't think
that's the problem.
Thanks--
On Jun 21, 2:26 am, mdipierro <[email protected]> wrote:
> On Jun 20, 8:50 pm, Yarin <[email protected]> wrote:
>
> > I set up web2py on a Fedora EC2 server, running with mod_wsgi and
> > Apache. Everything was working great with the initial setup. I then
> > tried to get amf working, by doing the following:
>
> > $ easy_install pyamf
> > $ apachectl restart
>
> > However, when I try to connect with my Flex client, I get:
> > "pyamf not installed or not in Python sys.path"
>
> > When I run web2py from the command line and check sys.path, I see
> > '/usr/lib/python2.5/site-packages/PyAMF-0.5.1-py2.5-linux-i686.egg'
>
> > Is restarting Apache not enough? Do RPC services even run through
> > Apache? (excuse my ignorance)
>
> It should. Is it possible you have different versions of Python?
>
>
>
> > Thanks- Yarin