Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3 Compatibility #43

Closed
foxmask opened this issue Jun 7, 2014 · 10 comments
Closed

Python 3 Compatibility #43

foxmask opened this issue Jun 7, 2014 · 10 comments

Comments

@foxmask
Copy link

foxmask commented Jun 7, 2014

On the readthedoc http://circus.readthedocs.org/en/latest/installation/ at the bottom of the page It said we can install circus-web, but we cant with python 3 as tornadio2 failed at the installation process like this :

Downloading/unpacking TornadIO2
  Downloading TornadIO2-0.0.4.tar.gz
  Running setup.py (path:/home/foxmask/.pyenv/versions/django-th-340/build/TornadIO2/setup.py) egg_info for package TornadIO2

Requirement already satisfied (use --upgrade to upgrade): simplejson>=2.1.0 in ./lib/python3.4/site-packages (from TornadIO2)
Requirement already satisfied (use --upgrade to upgrade): tornado>=2.2.0 in ./lib/python3.4/site-packages (from TornadIO2)
Installing collected packages: TornadIO2
  Running setup.py install for TornadIO2
      File "/home/foxmask/.pyenv/versions/django-th-340/lib/python3.4/site-packages/tornadio2/server.py", line 99
        except Exception, ex:
                        ^
    SyntaxError: invalid syntax

      File "/home/foxmask/.pyenv/versions/django-th-340/lib/python3.4/site-packages/tornadio2/session.py", line 429
        except Exception, ex:
                        ^
    SyntaxError: invalid syntax

      File "/home/foxmask/.pyenv/versions/django-th-340/lib/python3.4/site-packages/tornadio2/persistent.py", line 144
        except Exception, ex:
                        ^
    SyntaxError: invalid syntax

      File "/home/foxmask/.pyenv/versions/django-th-340/lib/python3.4/site-packages/tornadio2/flashserver.py", line 67
        except socket.error, ex:
                           ^
    SyntaxError: invalid syntax


Successfully installed TornadIO2
Cleaning up...

May be you can say in the doc that circus-web can only run with python 2.x to avoid to install it with python 3.

know issue about python 3 on tornadio2

@palmkevin
Copy link

+1

mithro added a commit to mithro/circus-web that referenced this issue Jul 20, 2014
torandio2 is no longer maintained, so Python 3.0 is not been added. This means
that circus-web doesn't work under (see Issue circus-tent#43).

From the torandio2 README.rst
> Unfortunately, Socket.IO 0.8 branch is abandoned, there are huge amount of
> bugs and nothing getting fixed. I would suggest to look at alternative
> options, for example SockJS <http://github.com/sockjs/>. There's
> sockjs-tornado <http://github.com/mrjoes/sockjs-tornado/> too. I don't plan
> to support TornadIO2 anymore, assuming that parent library is no longer
> maintained.

Following the example provided by seesaw-kit
ArchiveTeam/seesaw-kit#40
@bradjc
Copy link

bradjc commented Jan 3, 2015

+1

@riklaunim
Copy link
Contributor

You can check #60 - it works, at least up do displaying the connect page ;)

@sivabudh
Copy link

I'm running into the same issue.

2016-03-20 14:37:38 [54511] [INFO] Using <class 'chaussette.backend._wsgiref.ChaussetteServer'> as a backend
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/root/.pyenv/versions/3.5.1/envs/uihdb/lib/python3.5/site-packages/circusweb/circushttpd.py", line 25, in <module>
    import tornadio2
  File "/root/.pyenv/versions/3.5.1/envs/uihdb/lib/python3.5/site-packages/tornadio2/__init__.py", line 25, in <module>
    from tornadio2.router import TornadioRouter
  File "/root/.pyenv/versions/3.5.1/envs/uihdb/lib/python3.5/site-packages/tornadio2/router.py", line 27, in <module>
    from tornadio2 import persistent, polling, sessioncontainer, session, proto, preflight, stats
  File "/root/.pyenv/versions/3.5.1/envs/uihdb/lib/python3.5/site-packages/tornadio2/persistent.py", line 143
    except Exception, ex:
                    ^
SyntaxError: invalid syntax

@riklaunim
Copy link
Contributor

try git+git://github.com/tomassedovic/tornadio2.git@python3#tornadIO2-0.0.3

@RyanBalfanz
Copy link

+1

@foxmask
Copy link
Author

foxmask commented Sep 28, 2017

I could install it with python 3.6

$ which python
/home/foxmask/DjangoVirtualEnv/th/django-th/.venv/bin/python
$ python --version
Python 3.6.0

 pip install tornadio2
Collecting tornadio2
  Downloading TornadIO2-0.0.4.tar.gz
Collecting simplejson>=2.1.0 (from tornadio2)
  Downloading simplejson-3.11.1.tar.gz (78kB)
    100% |████████████████████████████████| 81kB 2.4MB/s 
Requirement already satisfied: tornado>=2.2.0 in ./.venv/lib/python3.6/site-packages (from tornadio2)
Building wheels for collected packages: tornadio2, simplejson
  Running setup.py bdist_wheel for tornadio2 ... done
  Stored in directory: /home/foxmask/.cache/pip/wheels/a6/b5/8b/d6446d10c9c818ae05960e47f321975586d4b5773687665f31
  Running setup.py bdist_wheel for simplejson ... done
  Stored in directory: /home/foxmask/.cache/pip/wheels/bf/0a/27/5d5e337ed16a175fd483a8c1486b4343ea2632be7ac57bad5d
Successfully built tornadio2 simplejson
Installing collected packages: simplejson, tornadio2
Successfully installed simplejson-3.11.1 tornadio2-0.0.4

@foxmask foxmask closed this as completed Sep 28, 2017
@zhangjianpinghik
Copy link

@foxmask @palmkevin @bradjc @riklaunim @sivabudh when i use circus-web, a error occur:

2018-01-25 08:20:40 tornado.access[18236] [INFO] 200 GET /dGNwOi8vMTAuNjYuMjA0LjExOjY2NjY%3D/watcher/create_vm/ (10.65.128.5) 45.45ms
2018-01-25 08:20:40 tornado.access[18236] [INFO] 200 GET /socket.io/1/?t=1516839655860 (10.65.128.5) 1.04ms
2018-01-25 08:20:40 tornado.access[18236] [INFO] 101 GET /socket.io/1/websocket/01e52679e4390189c9cd20bdbaf6fb5e (10.65.128.5) 0.77ms
2018-01-25 08:20:40 tornado.application[18236] [ERROR] Uncaught exception in /socket.io/1/websocket/01e52679e4390189c9cd20bdbaf6fb5e
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/tornado/websocket.py", line 494, in _run_callback
result = callback(*args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/TornadIO2-0.0.3-py3.4.egg/tornadio2/persistent.py", line 91, in open
raise HTTPError(401, "Invalid Session")
tornado.web.HTTPError: HTTP 401: Unauthorized (Invalid Session)

@kgreenek
Copy link

kgreenek commented Jul 31, 2018

Sorry for resurrecting this, but I'm still seeing this issue. I'm using the latest version of circusd from pypi (v0.15.0). Python version 3.6.5 on Ubuntu 18.04. I set up a python3 virtual env and pip installed circus and circus-web. Is there a work-around for this?

edit:
I also tested this on Ubuntu 16.04 with python 3.5.4 and I see the same error.

Here's the full exception:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/kevin/src/kgreenek/circus_test/env/lib/python3.6/site-packages/circusweb/circushttpd.py", line 25, in <module>
    import tornadio2
  File "/home/kevin/src/kgreenek/circus_test/env/lib/python3.6/site-packages/tornadio2/__init__.py", line 25, in <module>
    from tornadio2.router import TornadioRouter
  File "/home/kevin/src/kgreenek/circus_test/env/lib/python3.6/site-packages/tornadio2/router.py", line 27, in <module>
    from tornadio2 import persistent, polling, sessioncontainer, session, proto, preflight, stats
  File "/home/kevin/src/kgreenek/circus_test/env/lib/python3.6/site-packages/tornadio2/persistent.py", line 143
    except Exception, ex:
                    ^
SyntaxError: invalid syntax

Here's my full ini file:

[circus]
statsd = 1
httpd = 1

[watcher:ping]
cmd = ping google.com

@riklaunim
Copy link
Contributor

circus-web is abandoned and the Python3 version wasn't published as a package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants