Hello all & problem with server.py in SIMPLE

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Hello all & problem with server.py in SIMPLE

Javier Reyes
Hello All,

My name is Javier and have just begun using pyAMF.  My purpose is developing a Flex interface for a Python powered site. I work with python 2.6.2 on a MacBook laptop with Max OsX Leopard. I use Flex Builder 3 and the debug version of Flash Player 10.  As I dont have Xcode installed I used the "python setup.py install --disable-ext"  to have pyAMF installed.

I could run the "Hello World" example without problems (well, I had to go into the security setup of flash to relax the security check when trying to connect to localhost) but I am experiencing a problem with the "simple" example. When I run the server.py file I get this error:

Traceback (most recent call last):
  File "/Users/javierreyes/Desktop/PyAMF-examples-0.5/simple/python/client.py", line 111, in <module>
    host_info[0] = options.host
TypeError: 'tuple' object does not support item assignment

Am I doing something wrong ?  Thanks very much for your help.

-Javier

_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Hello all & problem with server.py in SIMPLE

Nick Joyce
On 9 Nov 2009, at 07:20, Javier Reyes wrote:

Hello All,

My name is Javier and have just begun using pyAMF.  My purpose is developing a Flex interface for a Python powered site. I work with python 2.6.2 on a MacBook laptop with Max OsX Leopard. I use Flex Builder 3 and the debug version of Flash Player 10.  As I dont have Xcode installed I used the "python setup.py install --disable-ext"  to have pyAMF installed.

I could run the "Hello World" example without problems (well, I had to go into the security setup of flash to relax the security check when trying to connect to localhost) but I am experiencing a problem with the "simple" example. When I run the server.py file I get this error:

Traceback (most recent call last):
  File "/Users/javierreyes/Desktop/PyAMF-examples-0.5/simple/python/client.py", line 111, in <module>
    host_info[0] = options.host
TypeError: 'tuple' object does not support item assignment

Am I doing something wrong ?  Thanks very much for your help.

-Javier
_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users

Hi,

Thanks for your excellent report. I committed a fix for this in r2943 but have also included the diff here.

Hopefully this will help you to move on!

Cheers,

Nick


_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users

simple-example-tuple.diff (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Hello all & problem with server.py in SIMPLE

Javier Reyes
Hi Nick,

Thanks for taking a look at it. I have tried patching both the server and client files but they dont seem to work.  I attach the patched server file. Could you please send me the final python source for the server. I dont know exactly what went wrong.

All the best,
                             Javier

On Tue, Nov 10, 2009 at 4:28 PM, Nick Joyce <[hidden email]> wrote:
On 9 Nov 2009, at 07:20, Javier Reyes wrote:

Hello All,

My name is Javier and have just begun using pyAMF.  My purpose is developing a Flex interface for a Python powered site. I work with python 2.6.2 on a MacBook laptop with Max OsX Leopard. I use Flex Builder 3 and the debug version of Flash Player 10.  As I dont have Xcode installed I used the "python setup.py install --disable-ext"  to have pyAMF installed.

I could run the "Hello World" example without problems (well, I had to go into the security setup of flash to relax the security check when trying to connect to localhost) but I am experiencing a problem with the "simple" example. When I run the server.py file I get this error:

Traceback (most recent call last):
  File "/Users/javierreyes/Desktop/PyAMF-examples-0.5/simple/python/client.py", line 111, in <module>
    host_info[0] = options.host
TypeError: 'tuple' object does not support item assignment

Am I doing something wrong ?  Thanks very much for your help.

-Javier
_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users

Hi,

Thanks for your excellent report. I committed a fix for this in r2943 but have also included the diff here.

Hopefully this will help you to move on!

Cheers,

Nick


_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users



_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users

server_patched.py (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Hello all & problem with server.py in SIMPLE

Thijs Triemstra
On Wed, November 11, 2009 00:57, Javier Reyes wrote:

> Hi Nick,
>
> Thanks for taking a look at it. I have tried patching both the server and
> client files but they dont seem to work.  I attach the patched server
> file.
> Could you please send me the final python source for the server. I dont
> know
> exactly what went wrong.
>
> All the best,
>                              Javier

Hi Javier,

Nick updated the trunk and you can download the new files by checking out
a copy of http://svn.pyamf.org/examples/trunk/simple/

hth,

Thijs



_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Hello all & problem with server.py in SIMPLE

Javier Reyes
Hello Again,

I've checked out http://svn.pyamf.org/examples/trunk/simple/ , but when I try to run server.py I get the following:

Traceback (most recent call last):
  File "/PyAMF-examples-0.5 2/python/server.py", line 143, in <module>
    main()
  File "/PyAMF-examples-0.5 2/python/server.py", line 117, in main
    simple_server.WSGIRequestHandler)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/SocketServer.py", line 400, in __init__
    self.server_bind()
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/wsgiref/simple_server.py", line 50, in server_bind
    HTTPServer.server_bind(self)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/BaseHTTPServer.py", line 108, in server_bind
    SocketServer.TCPServer.server_bind(self)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/SocketServer.py", line 411, in server_bind
    self.socket.bind(self.server_address)
  File "<string>", line 1, in bind
TypeError: getsockaddrarg: AF_INET address must be tuple, not list


I'm just opening server.py it with IDLE annd running it with no arguments. (I understand it would run on localhost using port 8000); I can run the flex client, but obviously I get a connection error.

My PyAMF instalation should be OK as I am running examples conecting flex with python exchanging basic types such as ints, string , booleans and ArrayCollections.

Any Idea or suggestion ?

Best,
                  Javier




On Wed, Nov 18, 2009 at 8:50 PM, Thijs Triemstra | Collab <[hidden email]> wrote:
On Wed, November 11, 2009 00:57, Javier Reyes wrote:
> Hi Nick,
>
> Thanks for taking a look at it. I have tried patching both the server and
> client files but they dont seem to work.  I attach the patched server
> file.
> Could you please send me the final python source for the server. I dont
> know
> exactly what went wrong.
>
> All the best,
>                              Javier

Hi Javier,

Nick updated the trunk and you can download the new files by checking out
a copy of http://svn.pyamf.org/examples/trunk/simple/

hth,

Thijs



_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users


_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Hello all & problem with server.py in SIMPLE

Nick Joyce
On 24 Nov 2009, at 09:24, Javier Reyes wrote:

Hello Again,

I've checked out http://svn.pyamf.org/examples/trunk/simple/ , but when I try to run server.py I get the following:

Traceback (most recent call last):
  File "/PyAMF-examples-0.5 2/python/server.py", line 143, in <module>
    main()
  File "/PyAMF-examples-0.5 2/python/server.py", line 117, in main
    simple_server.WSGIRequestHandler)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/SocketServer.py", line 400, in __init__
    self.server_bind()
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/wsgiref/simple_server.py", line 50, in server_bind
    HTTPServer.server_bind(self)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/BaseHTTPServer.py", line 108, in server_bind
    SocketServer.TCPServer.server_bind(self)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/SocketServer.py", line 411, in server_bind
    self.socket.bind(self.server_address)
  File "<string>", line 1, in bind
TypeError: getsockaddrarg: AF_INET address must be tuple, not list


I'm just opening server.py it with IDLE annd running it with no arguments. (I understand it would run on localhost using port 8000); I can run the flex client, but obviously I get a connection error.

My PyAMF instalation should be OK as I am running examples conecting flex with python exchanging basic types such as ints, string , booleans and ArrayCollections.

Any Idea or suggestion ?

Best,
                  Javier




On Wed, Nov 18, 2009 at 8:50 PM, Thijs Triemstra | Collab <[hidden email]> wrote:
On Wed, November 11, 2009 00:57, Javier Reyes wrote:
> Hi Nick,
>
> Thanks for taking a look at it. I have tried patching both the server and
> client files but they dont seem to work.  I attach the patched server
> file.
> Could you please send me the final python source for the server. I dont
> know
> exactly what went wrong.
>
> All the best,
>                              Javier

Hi Javier,

Nick updated the trunk and you can download the new files by checking out
a copy of http://svn.pyamf.org/examples/trunk/simple/

hth,

Thijs



_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users

_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users

Hi Javier,

I have (hopefully) sorted the problem. I wasn't using Python2.6 ... but was able to reproduce. There was a bug that caused the host/port args to be swapped and wsgiref would make blow up. Please update to r2953.

Let me know how you get on.

Cheers,

Nick

_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Hello all & problem with server.py in SIMPLE

Javier Reyes
Hi Nick,

Thank you very much. Now it works for me too!

Best,
                      Javier

On Wed, Nov 25, 2009 at 1:01 AM, Nick Joyce <[hidden email]> wrote:
On 24 Nov 2009, at 09:24, Javier Reyes wrote:

Hello Again,

I've checked out http://svn.pyamf.org/examples/trunk/simple/ , but when I try to run server.py I get the following:

Traceback (most recent call last):
  File "/PyAMF-examples-0.5 2/python/server.py", line 143, in <module>
    main()
  File "/PyAMF-examples-0.5 2/python/server.py", line 117, in main
    simple_server.WSGIRequestHandler)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/SocketServer.py", line 400, in __init__
    self.server_bind()
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/wsgiref/simple_server.py", line 50, in server_bind
    HTTPServer.server_bind(self)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/BaseHTTPServer.py", line 108, in server_bind
    SocketServer.TCPServer.server_bind(self)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/SocketServer.py", line 411, in server_bind
    self.socket.bind(self.server_address)
  File "<string>", line 1, in bind
TypeError: getsockaddrarg: AF_INET address must be tuple, not list


I'm just opening server.py it with IDLE annd running it with no arguments. (I understand it would run on localhost using port 8000); I can run the flex client, but obviously I get a connection error.

My PyAMF instalation should be OK as I am running examples conecting flex with python exchanging basic types such as ints, string , booleans and ArrayCollections.

Any Idea or suggestion ?

Best,
                  Javier




On Wed, Nov 18, 2009 at 8:50 PM, Thijs Triemstra | Collab <[hidden email]> wrote:
On Wed, November 11, 2009 00:57, Javier Reyes wrote:
> Hi Nick,
>
> Thanks for taking a look at it. I have tried patching both the server and
> client files but they dont seem to work.  I attach the patched server
> file.
> Could you please send me the final python source for the server. I dont
> know
> exactly what went wrong.
>
> All the best,
>                              Javier

Hi Javier,

Nick updated the trunk and you can download the new files by checking out
a copy of http://svn.pyamf.org/examples/trunk/simple/

hth,

Thijs



_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users

_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users

Hi Javier,

I have (hopefully) sorted the problem. I wasn't using Python2.6 ... but was able to reproduce. There was a bug that caused the host/port args to be swapped and wsgiref would make blow up. Please update to r2953.

Let me know how you get on.

Cheers,

Nick

_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users



_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users