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

Traceback on zpm execute without --container #194

Open
mgeisler opened this issue Oct 23, 2014 · 1 comment
Open

Traceback on zpm execute without --container #194

mgeisler opened this issue Oct 23, 2014 · 1 comment
Labels

Comments

@mgeisler
Copy link
Contributor

When running

$ zpm execute automr.zapp

I got the traceback below. It works if I first deploy the zapp and use --container. This is with zpm 0.3:

Traceback (most recent call last):
  File "/home/mg/.virtualenvs/zpm/bin/zpm", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/mg/src/zpm/zpm", line 29, in <module>
    args.func(args)
  File "/home/mg/src/zpm/zpmlib/commands.py", line 113, in inner
    return func(namespace, *args, **kwargs)
  File "/home/mg/src/zpm/zpmlib/commands.py", line 275, in execute
    resp = zpm.execute(args)
  File "/home/mg/src/zpm/zpmlib/zpm.py", line 762, in execute
    conn.post_zapp(data_reader, response_dict=resp, content_length=size)
  File "/home/mg/src/zpm/zpmlib/zpm.py", line 416, in post_zapp
    content_length=content_length)
  File "/home/mg/.virtualenvs/zpm/local/lib/python2.7/site-packages/swiftclient/client.py", line 1243, in _retry
    rv = func(self.url, self.token, *args, **kwargs)
  File "/home/mg/src/zpm/zpmlib/zpm.py", line 378, in _post_job
    conn.request('POST', parsed.path, data, headers)
  File "/home/mg/.virtualenvs/zpm/local/lib/python2.7/site-packages/swiftclient/client.py", line 217, in request
    files=files, **self.requests_args)
  File "/home/mg/.virtualenvs/zpm/local/lib/python2.7/site-packages/swiftclient/client.py", line 185, in _request
    return self.request_session.request(*arg, **kwarg)
  File "/home/mg/.virtualenvs/zpm/local/lib/python2.7/site-packages/requests/sessions.py", line 457, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/mg/.virtualenvs/zpm/local/lib/python2.7/site-packages/requests/sessions.py", line 569, in send
    r = adapter.send(request, **kwargs)
  File "/home/mg/.virtualenvs/zpm/local/lib/python2.7/site-packages/requests/adapters.py", line 362, in send
    timeout=timeout
  File "/home/mg/.virtualenvs/zpm/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 516, in urlopen
    body=body, headers=headers)
  File "/home/mg/.virtualenvs/zpm/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 308, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python2.7/httplib.py", line 1001, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.7/httplib.py", line 1035, in _send_request
    self.endheaders(body)
  File "/usr/lib/python2.7/httplib.py", line 997, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 854, in _send_output
    self.send(message_body)
  File "/usr/lib/python2.7/httplib.py", line 826, in send
    self.sock.sendall(data)
  File "/usr/lib/python2.7/ssl.py", line 693, in sendall
    amount = len(data)
TypeError: object of type 'callable-iterator' has no len()
@mgeisler mgeisler added the bug label Oct 23, 2014
@mgeisler
Copy link
Contributor Author

The code in question was added in dcbcfbe by @pkit . Constantine, on which platform did you test this? I'm using Python 2.7.8 and maybe something changed in httplib.

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

No branches or pull requests

1 participant