Testsuite version option causes crash

#1

Just as follow up, I've upgraded to python 2.7.2 and no longer get this error.

Regards,
Micheil Smith

···

--
Pusher.com

On 31 Oct 2011, at 19:23, Tobias Oberstein wrote:

I can't get it to work at all, this is with python 2.6.1 and autobahn 0.4.3.

it shouldn't have problems with 2.6 .. but if you have previously had
installed from the Git repo (before release), it might be a good
idea to completely remove

site-packages/autobahn..

directory, since sometimes stale pyc's (byte compiled Py) is causing confusion.

If you install Py 2.7, then you get a new site-packages dir anyway ..

I'm going to try upgrading to 2.7.2, and I'll respond off list with any further
problems. (or on an Autobahn mailing list, if one exists).

yep. good idea;)

http://groups.google.com/group/autobahnws

- Micheil

On 31 Oct 2011, at 18:52, Tobias Oberstein wrote:

However, one thing that I'm curious about is how I can test multiple
versions of the websocket protocol at once (em-websocket has some
support for most major versions).

When passing an options object into a server, the test runner crashes:
https://gist.github.com/1328400

I'm not sure if I get it, since the spec you posted

{
"servers": [
             {"agent": "EMWebSocket", "url": "ws://localhost:8080", "options":

{"version": 17}},

             {"agent": "AutobahnServer", "url": "ws://localhost:9000", "options":

{"version": 17}}

             ],

"cases": ["*"],
"exclude-cases": ["2.*"],
"exclude-agent-cases": {}
}

should work just fine.

You can "options" globally, and per server.

For the options available, see

http://www.tavendo.de/autobahn/doc/python/websocketclient.html#clien
t-

factory
setProtocolOptions()

===

It wont test multiple versions though. You can only do that
(currently) by starting your server multiple times on different ports and

then have a spec like this:

{
"servers": [
             {"agent": "EMWebSocket1", "url": "ws://localhost:8080", "options":

{"version": 10}},

             {"agent": "EMWebSocket2", "url": "ws://localhost:8081", "options":

{"version": 13}},

             {"agent": "EMWebSocket3", "url": "ws://localhost:8082",
"options": {"version": 17}}, ..

0 Likes

#2

thanks for follow up.

the line that caused issues

self.setProtocolOptions(**server.get("options", {}))

uses syntax to call a Py function with keyword arg bound from a dictionary.

I still think that should be fine for Py 2.6 too, but I can't currently check.

Anyway, issue gone;)

···

2011/10/31 Micheil Smith <mic...@brandedcode.com>:

Just as follow up, I've upgraded to python 2.7.2 and no longer get this error.

Regards,
Micheil Smith
--
Pusher.com

On 31 Oct 2011, at 19:23, Tobias Oberstein wrote:

I can't get it to work at all, this is with python 2.6.1 and autobahn 0.4.3.

it shouldn't have problems with 2.6 .. but if you have previously had
installed from the Git repo (before release), it might be a good
idea to completely remove

site-packages/autobahn..

directory, since sometimes stale pyc's (byte compiled Py) is causing confusion.

If you install Py 2.7, then you get a new site-packages dir anyway ..

I'm going to try upgrading to 2.7.2, and I'll respond off list with any further
problems. (or on an Autobahn mailing list, if one exists).

yep. good idea;)

http://groups.google.com/group/autobahnws

- Micheil

On 31 Oct 2011, at 18:52, Tobias Oberstein wrote:

However, one thing that I'm curious about is how I can test multiple
versions of the websocket protocol at once (em-websocket has some
support for most major versions).

When passing an options object into a server, the test runner crashes:
https://gist.github.com/1328400

I'm not sure if I get it, since the spec you posted

{
"servers": [
{"agent": "EMWebSocket", "url": "ws://localhost:8080", "options":

{"version": 17}},

         \{&quot;agent&quot;: &quot;AutobahnServer&quot;, &quot;url&quot;: &quot;ws://localhost:9000&quot;, &quot;options&quot;:

{"version": 17}}

         \],

"cases": ["*"],
"exclude-cases": ["2.*"],
"exclude-agent-cases": {}
}

should work just fine.

You can "options" globally, and per server.

For the options available, see

http://www.tavendo.de/autobahn/doc/python/websocketclient.html#clien
t-

factory
setProtocolOptions()

===

It wont test multiple versions though. You can only do that
(currently) by starting your server multiple times on different ports and

then have a spec like this:

{
"servers": [
{"agent": "EMWebSocket1", "url": "ws://localhost:8080", "options":

{"version": 10}},

         \{&quot;agent&quot;: &quot;EMWebSocket2&quot;, &quot;url&quot;: &quot;ws://localhost:8081&quot;, &quot;options&quot;:

{"version": 13}},

         \{&quot;agent&quot;: &quot;EMWebSocket3&quot;, &quot;url&quot;: &quot;ws://localhost:8082&quot;,

"options": {"version": 17}}, ..

0 Likes