Giter Site home page Giter Site logo

Comments (5)

0xshipthecode avatar 0xshipthecode commented on September 27, 2024

I am seeing a similar thing on OS X 10.9:

[E 140301 01:43:00 ioloop:491] Exception in callback <function wrapped at 0x1029222a8>
Traceback (most recent call last):
File "/Applications/anaconda/lib/python2.7/site-packages/tornado/ioloop.py", line 688, in start
self._handlers[fd](fd, events)
File "/Applications/anaconda/lib/python2.7/site-packages/tornado/stack_context.py", line 331, in wrapped
raise_exc_info(exc)
File "/Applications/anaconda/lib/python2.7/site-packages/tornado/stack_context.py", line 302, in wrapped
ret = fn(_args, *_kwargs)
File "/Applications/anaconda/lib/python2.7/site-packages/butterfly/routes.py", line 242, in shell_handler
self.write_message(read.decode('utf-8', 'replace'))
File "/Applications/anaconda/lib/python2.7/site-packages/tornado/websocket.py", line 178, in write_message
raise WebSocketClosedError()
WebSocketClosedError

but ONLY after I exit one of the butterfly terminals for the first time via typing exit. Until the first terminal exit, it's golden.

Also, if I close the tab forcibly (and 'leave the page') then tornado seems to reuse file descriptors:

[E 140301 01:44:59 websocket:325] Uncaught exception in /ws/
Traceback (most recent call last):
File "/Applications/anaconda/lib/python2.7/site-packages/tornado/websocket.py", line 322, in wrapper
return callback(_args, *_kwargs)
File "/Applications/anaconda/lib/python2.7/site-packages/butterfly/routes.py", line 216, in open
self.pty()
File "/Applications/anaconda/lib/python2.7/site-packages/butterfly/routes.py", line 105, in pty
self.communicate()
File "/Applications/anaconda/lib/python2.7/site-packages/butterfly/routes.py", line 180, in communicate
self.fd, self.shell_handler, ioloop.READ | ioloop.ERROR)
File "/Applications/anaconda/lib/python2.7/site-packages/tornado/ioloop.py", line 545, in add_handler
self._impl.register(fd, events | self.ERROR)
File "/Applications/anaconda/lib/python2.7/site-packages/tornado/platform/kqueue.py", line 40, in register
raise IOError("fd %d already registered" % fd)
IOError: fd 10 already registered

Let me know if you need any more information.

from butterfly.

paradoxxxzero avatar paradoxxxzero commented on September 27, 2024

I see this seems to be a problem with the connection closure around there : https://github.com/paradoxxxzero/butterfly/blob/master/butterfly/routes.py#L244

Sadly, I have no Mac OS X to try to figure it out... If someone can look over it, that would be nice.

from butterfly.

paradoxxxzero avatar paradoxxxzero commented on September 27, 2024

Does the last version still do this?

from butterfly.

0xshipthecode avatar 0xshipthecode commented on September 27, 2024

Butterfly v 1.2.9 does not exhibit the error to me anymore. Thanks!
Now, when I 'exit', the the shell echos 'exit' and then writes out 'Closed' with no errors showing up in the terminal.

from butterfly.

rinchen avatar rinchen commented on September 27, 2024

Confirmed. I've updated and this error no longer occurs.

from butterfly.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.