实时协同编辑:Windows7x64上的mobwrite

2024-10-04 03:23:40 发布

您现在位置:Python中文网/ 问答频道 /正文

我已经使用守护进程和q.py侦听器在Win7开发计算机上设置了Mobwrite。客户机测试套件通过,但当我运行服务器测试套件时,所有操作都会失败,并出现以下响应:

Question:
U:user10259538167863824
f:0:unittest10259538167863824
R:0:Hello world

Expected:
u:user10259538167863824
F:0:unittest10259538167863824
D:0:=11

Actual:
u:user10259538167863824
F:0:unittest10259538167863824
D:0:=11

Diff:   
u:user10259538167863824
¶
F:0:unittest10259538167863824
¶
D:0:=11¶

¶

¶

我假设这和行尾有关,但我不知道该怎么办。有人能解释一下吗?在

非常感谢!在

PS:我运行的是Python2.7


Tags: py服务器helloworld客户机套件进程计算机
2条回答

它发生在Chrome 8.0.552.224/FF 3.6.12/IE 8.0.7600.16385中

另外,我用CGI运行q.py,而不是mod峎python。在

以下是原始结果:

%3CSPAN%20TITLE%3D%22i%3D0%22%3Eu%3Auser680700127966702%3C/SPAN%3E%3CINS%20STYLE%3D%22background%3A%23E6FFE6%3B%22%20TITLE%3D%22i%3D21%22%3E%0D%3C/INS%3E%3CSPAN%20TITLE%3D%22i%3D22%22%3E%26para%3B%3CBR%3EF%3A0%3Aunittest680700127966702%3C/SPAN%3E%3CINS%20STYLE%3D%22background%3A%23E6FFE6%3B%22%20TITLE%3D%22i%3D50%22%3E%0D%3C/INS%3E%3CSPAN%20TITLE%3D%22i%3D51%22%3E%26para%3B%3CBR%3ED%3A0%3A%3D11%3C/SPAN%3E%3CDEL%20STYLE%3D%22background%3A%23FFE6E6%3B%22%20TITLE%3D%22i%3D59%22%3E%26para%3B%3CBR%3E%3C/DEL%3E%3CINS%20STYLE%3D%22background%3A%23E6FFE6%3B%22%20TITLE%3D%22i%3D59%22%3E%0D%26para%3B%3CBR%3E%0D%3C/INS%3E%3CSPAN%20TITLE%3D%22i%3D62%22%3E%26para%3B%3CBR%3E%3C/SPAN%3E

…并解码以便于阅读:

^{pr2}$

…这是测试套件的服务器输出

INFO:mobwrite:Read 0 settings from ./lib/mobwrite_config.txt
INFO:mobwrite:Listening on port 3017...
INFO:mobwrite:Running cleanup task.
INFO:mobwrite:Connection accepted from 127.0.0.1
WARNING:mobwrite:Truncated data: '
'
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 11b raw text: ''
INFO:mobwrite:Sent '=11' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
WARNING:mobwrite:Rollback from shadow 1 to backup shadow 0
INFO:mobwrite:Got 11b raw text: ''
INFO:mobwrite:Sent '=11' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 11b raw text: ''
INFO:mobwrite:Sent '=11' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
WARNING:mobwrite:Rollback from shadow 1 to backup shadow 0
INFO:mobwrite:Got 1b raw text: ''
INFO:mobwrite:Sent '-1  +Hello world' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 11b raw text: ''
INFO:mobwrite:Sent '=11' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got '+Hello world' delta: ''
INFO:mobwrite:Sent '=11' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got '-1' delta: ''
WARNING:mobwrite:Delta failure, expected 0 length: ''
INFO:mobwrite:Sent empty raw text: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 11b raw text: ''
INFO:mobwrite:Got '-5   +Goodbye        =6' delta: ''
INFO:mobwrite:Sent '=13' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 11b raw text: ''
INFO:mobwrite:Got '-5   +Goodbye        =5' delta: ''
WARNING:mobwrite:Delta failure, expected 11 length: ''
INFO:mobwrite:Sent 11b raw text: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 11b raw text: ''
INFO:mobwrite:Sent '=11' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 11b raw text: ''
INFO:mobwrite:Sent '=11' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Idle out: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got '=11' delta: ''
WARNING:mobwrite:Delta failure, expected 0 length: ''
INFO:mobwrite:Sent empty raw text: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got '=11' delta: ''
INFO:mobwrite:Sent '=11' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 11b raw text: ''
INFO:mobwrite:Sent '=11' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 11b raw text: ''
INFO:mobwrite:Sent '=11' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Idle out: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got '=11' delta: ''
WARNING:mobwrite:Delta failure, expected 0 length: ''
INFO:mobwrite:Sent empty raw text: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got '=11' delta: ''
INFO:mobwrite:Sent '=11' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 51b raw text: ''
INFO:mobwrite:Got '-1' delta: ''
WARNING:mobwrite:Delta failure, expected 51 length: ''
INFO:mobwrite:Sent 51b raw text: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 0b raw text: ''
INFO:mobwrite:Got '+A-Z a-z 0-9 - _ . ! ~ * ' ( ) ; / ? : @ & = + $ , #' delta: ''
INFO:mobwrite:Sent '-1  +A-Z a-z 0-9 - _ . ! ~ * ' ( ) ; / ? : @ & = + $ , #' delta: ''
INFO:mobwrite:Got '-1' delta: ''
WARNING:mobwrite:Delta failure, expected 7 length: ''
INFO:mobwrite:Sent 13b raw text: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 0b raw text: ''
INFO:mobwrite:Got '+a%00b%25c%0Ad' delta: ''
INFO:mobwrite:Got 1b raw text: ''
INFO:mobwrite:Sent '-1  +a%00b%25c%0Ad' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 3b raw text: ''
INFO:mobwrite:Got '-1' delta: ''
WARNING:mobwrite:Delta failure, expected 3 length: ''
INFO:mobwrite:Sent 11b raw text: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 0b raw text: ''
INFO:mobwrite:Got '+a%E3%81%86b' delta: ''
INFO:mobwrite:Got 1b raw text: ''
INFO:mobwrite:Sent '-1  +a%E3%81%86b' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 3b raw text: ''
INFO:mobwrite:Sent '=1  -1      +%0A    =1' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 2b raw text: ''
INFO:mobwrite:Got '=1   +%0D%0A =1' delta: ''
INFO:mobwrite:Sent '=1  -1      =2' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 11b raw text: ''
INFO:mobwrite:Sent '=11' delta: ''
INFO:mobwrite:Got 11b raw text: ''
INFO:mobwrite:Got '-5   +Goodbye        =6' delta: ''
INFO:mobwrite:Sent '=13' delta: ''
WARNING:mobwrite:Rollback from shadow 1 to backup shadow 0
INFO:mobwrite:Got '=11' delta: ''
INFO:mobwrite:Sent '-5  +Goodbye        =6' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 11b raw text: ''
INFO:mobwrite:Sent '=11' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 11b raw text: ''
INFO:mobwrite:Got '-5   +Goodbye        =6' delta: ''
INFO:mobwrite:Sent '=13' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got '=9   -2      +m' delta: ''
INFO:mobwrite:Sent '-5  +Goodbye        =5' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 11b raw text: ''
INFO:mobwrite:Sent '=11' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 11b raw text: ''
INFO:mobwrite:Got '-5   +Goodbye        =6' delta: ''
INFO:mobwrite:Sent '=13' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got '-5   +My     =6' delta: ''
INFO:mobwrite:Sent '-2  +Goodbye        =6' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 2b raw text: ''
INFO:mobwrite:Sent '=2' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 2b raw text: ''
INFO:mobwrite:Got '+a   =2' delta: ''
INFO:mobwrite:Sent '=3' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got '=2   +d' delta: ''
INFO:mobwrite:Sent '+a  =3' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 2b raw text: ''
INFO:mobwrite:Sent '=2' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 2b raw text: ''
INFO:mobwrite:Got '+1   =2' delta: ''
INFO:mobwrite:Sent '=3' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got '=2   +4' delta: ''
INFO:mobwrite:Sent '=3' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Expired buffer: 'testbuffer1_3'
INFO:mobwrite:Executing buffer: testbuffer1_3
INFO:mobwrite:Got 11b raw text: ''
INFO:mobwrite:Sent '=11' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Expired buffer: 'testbuffer3_3'
INFO:mobwrite:Executing buffer: testbuffer3_3
INFO:mobwrite:Expired buffer: 'testbuffer4_3'
INFO:mobwrite:Executing buffer: testbuffer4_3
INFO:mobwrite:Got 11b raw text: ''
INFO:mobwrite:Sent '=11' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
ERROR:mobwrite:Invalid buffer: 'testbuffer5 0 0'
ERROR:mobwrite:Invalid buffer: 'testbuffer6 0 1'
ERROR:mobwrite:Invalid buffer: 'testbuffer7 1 2'
INFO:mobwrite:Executing buffer: testbuffer8_1
INFO:mobwrite:Got 11b raw text: ''
INFO:mobwrite:Sent '=11' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 11b raw text: ''
INFO:mobwrite:Sent '=11' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got '-5   +Goodbye        =6' delta: ''
INFO:mobwrite:Sent '=13' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
WARNING:mobwrite:Rollback from shadow 2 to backup shadow 1
INFO:mobwrite:Got '-5   +Goodbye        =6' delta: ''
WARNING:mobwrite:Repeated delta: 0 '
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 11b raw text: ''
INFO:mobwrite:Sent '=11' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got 13b raw text: ''
INFO:mobwrite:Sent '=13' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
INFO:mobwrite:Got '=11' delta: ''
INFO:mobwrite:Sent '-5  +Goodbye        =6' delta: ''
INFO:mobwrite:Connection accepted from 127.0.0.1
WARNING:mobwrite:Rollback from shadow 2 to backup shadow 1
INFO:mobwrite:Got '=11' delta: ''
WARNING:mobwrite:Repeated delta: 0 '
INFO:mobwrite:Sent '-5  +Goodbye        =6' delta: ''

MobWrite支持小组可能是问这个问题的最佳地点: http://groups.google.com/group/mobwrite

我同意单元测试可能由于行尾而失败。MobWrite总是使用\n作为其行结尾。如果使用ASCII将单元测试(XML文件)传输到Windows框中,那么将它们注入行结尾听起来很合理。在

我明天再看看能不能重现。同时,如果所有的单元测试都像这样“失败”,那么我会接受MobWrite运行良好,而这些测试只是假的。继续发展!在

相关问题 更多 >