Hello. Some questions about websockets:
1) Can websockets be implemented within web2py without any in-socket server side component?
--
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hello. Some questions about websockets:
1) Can websockets be implemented within web2py without any in-socket server side component?
Hi Ricardo. I would love to have a functional example. Could you please make one?
Hi Ricardo,Thank you very much for posting the application. Here are a few questions that I have regarding this:
1. Do I need to put the route.py in the root directory of my app?2. I tried by putting the routes.py in the rood directory of iochat. run_io_chat.py was also created in the same directory. I also included
import syssys.path.append('path_to_web2py\library.zip')at the very top of your run_io_chat.py. When I run the command python.exe run_io_chat.py, I get the error: Cannot determine web2py version.
Also when I try to visit http://127.0.0.1:8000/iochat/default/index, I get the following ticket:<type 'exceptions.ImportError'> No module named socketio.namespace
admin disabled because unable to access password file
routes_in = ( ('/socket.io/$anything', '/iochat/default/socketio/$anything'),)(site)MacBook:~ MacBookPro$ python ~/site/web2py/run_iochat.py
Traceback (most recent call last):
File "/Users/MacBookPro/site/web2py/run_iochat.py", line 8, in <module>
from gluon.main import wsgibase
File "/Users/MacBookPro/site/web2py/gluon/main.py", line 121, in <module>
raise RuntimeError("Cannot determine web2py version")
RuntimeError: Cannot determine web2py version
when tried to access from web2py site
Traceback (most recent call last):
File "/Users/MacBookPro/site/web2py/gluon/restricted.py", line 227, in restricted
exec ccode in environment
File "/Users/MacBookPro/site/web2py/applications/iochat/models/db.py", line 14, in <module>
import chat
File "/Users/MacBookPro/site/web2py/gluon/custom_import.py", line 85, in custom_importer
modules_prefix, globals, locals, [itemname], level)
File "applications/iochat/modules/chat.py", line 8, in <module>
from gluon.dal import DAL, BaseAdapter, Field
ImportError: cannot import name BaseAdapter
any idea or solution for this?
thanks and best regards,
stifan