Skip to content

Error while running under python 3.4 #8

Closed

Description

@dnephin
$ fig run console bash
Traceback (most recent call last):
  File "...fig/.tox/py34/lib/python3.4/site-packages/dockerpty/pty.py", line 143, in start
    flags = [io.set_blocking(p, False) for p in pumps]
  File "...fig/.tox/py34/lib/python3.4/site-packages/dockerpty/pty.py", line 143, in <listcomp>
    flags = [io.set_blocking(p, False) for p in pumps]
  File "...fig/.tox/py34/lib/python3.4/site-packages/dockerpty/io.py", line 31, in set_blocking
    old_flag = fcntl.fcntl(fd, fcntl.F_GETFL)
ValueError: file descriptor cannot be a negative integer (-1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "...fig/.tox/py34/bin/fig", line 9, in <module>
    load_entry_point('fig==0.5.2', 'console_scripts', 'fig')()
  File "...fig/.tox/py34/lib/python3.4/site-packages/fig/cli/main.py", line 30, in main
    command.sys_dispatch()
  File "...fig/.tox/py34/lib/python3.4/site-packages/fig/cli/docopt_command.py", line 21, in sys_dispatch
    self.dispatch(sys.argv[1:], None)
  File "...fig/.tox/py34/lib/python3.4/site-packages/fig/cli/command.py", line 28, in dispatch
    super(Command, self).dispatch(*args, **kwargs)
  File "...fig/.tox/py34/lib/python3.4/site-packages/fig/cli/docopt_command.py", line 24, in dispatch
    self.perform_command(*self.parse(argv, global_options))
  File "...fig/.tox/py34/lib/python3.4/site-packages/fig/cli/command.py", line 49, in perform_command
    handler(project, command_options)
  File "...fig/.tox/py34/lib/python3.4/site-packages/fig/cli/main.py", line 263, in run
    dockerpty.start(project.client, container.id)
  File "...fig/.tox/py34/lib/python3.4/site-packages/dockerpty/__init__.py", line 27, in start
    PseudoTerminal(client, container).start()
  File "...fig/.tox/py34/lib/python3.4/site-packages/dockerpty/pty.py", line 147, in start
    if flags:
UnboundLocalError: local variable 'flags' referenced before assignment

The flags error seems easy enough to fix (just set it to None before the try/except).

The other one looks to be caused by this:

pumps:

stdin: (Stream(<_io.TextIOWrapper name='<stdin>' mode='r' encoding='UTF-8'>), Stream(<socket.socket [closed] fd=-1, family=AddressFamily.AF_UNIX, type=SocketType.SOCK_STREAM, proto=0>)), 

stdout: (Stream(<socket.socket [closed] fd=-1, family=AddressFamily.AF_UNIX, type=SocketType.SOCK_STREAM, proto=0>), Stream(<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)), 

stderr: (Stream(<socket.socket [closed] fd=-1, family=AddressFamily.AF_UNIX, type=SocketType.SOCK_STREAM, proto=0>), Stream(<_io.TextIOWrapper name='<stderr>' mode='w' encoding='UTF-8'>))

Activity

  1. dnephin commented on Aug 24, 2014

    @dnephin
    CollaboratorAuthor

    I setup the test suite to run under py3.3 and py3.4 and there are actually a bunch of failures, so this is probably not isolated.

  2. rmohr commented on Feb 14, 2015

    @rmohr
    Contributor

    The flags error is fixed in fab2b4a and the file descriptor error looks like docker/docker-py#413 and is fixed in docker-py 0.7.1. Chances are good that this one can be closed when #28 is merged.

  3. slel commented on Mar 4, 2019

    @slel

    Can this be closed? #28 was merged long ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions