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

Error with conda.py #77

Closed
zodiacfireworks opened this issue May 23, 2017 · 3 comments
Closed

Error with conda.py #77

zodiacfireworks opened this issue May 23, 2017 · 3 comments

Comments

@zodiacfireworks
Copy link

zodiacfireworks commented May 23, 2017

Hi! First of all, thanks for this great job.

I'm getting a lot of errors of this kind

failed: [sapho - longwing](item = ipywidgets) => {
    "failed": true,
    "item": "ipywidgets",
    "module_stderr": "\
        OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g  1 Mar 2016    \
        debug1: Reading configuration data /etc/ssh/ssh_config    \
        debug1: /etc/ssh/ssh_config line 19: Applying options for *    \
        debug1: auto-mux: Trying existing master    \
        debug2: fd 3 setting O_NONBLOCK    \
        debug2: mux_client_hello_exchange: master version 4    \
        debug3: mux_client_forwards: request forwardings: 0 local, 0 remote    \
        debug3: mux_client_request_session: entering    \
        debug3: mux_client_request_alive: entering    \
        debug3: mux_client_request_alive: done pid = 897    \
        debug3: mux_client_request_session: session request sent    \
        debug1: mux_client_request_session: master session id: 2    \
        debug3: mux_client_read_packet: read header failed: Broken pipe    \
        debug2: Received exit status from master 0    \
        Shared connection to sapho-longwing closed.    \
    ",
    "module_stdout": "\
        Traceback (most recent call last):    \
          File \"/tmp/ansible_dRn5ki/ansible_module_conda.py\", line 296, in <module>    \
            main()    \
          File \"/tmp/ansible_dRn5ki/ansible_module_conda.py\", line 281, in main    \
            installed, installed_version = _check_installed(module, conda, name)    \
          File \"/tmp/ansible_dRn5ki/ansible_module_conda.py\", line 141, in _check_installed    \
            pname, pversion, pdist = other.rsplit('-', 2)    \
        AttributeError: 'dict' object has no attribute 'rsplit'    \
    ",
    "msg": "MODULE FAILURE",
    "rc": 0
}

With many packages. The problem is that sometimes object becomes a dict object. In thos case I solved the problem with this

if isinstance(other, dict):
    pname = other.get('name', '') 
    pversion = other.get('version', '') 
else:
    pname, pversion, pdist = other.rsplit('-', 2)
@danielballan
Copy link

I have seen this error but found it to be transient (??!) and not often repeatable.

@zodiacfireworks
Copy link
Author

zodiacfireworks commented Jun 6, 2017

Hi @danielballan, this error was no transient to me, It have been appearing many times while I was testing this package.

@anaderi
Copy link

anaderi commented Jun 17, 2017

the error repeats here as well.
NB: when I was installing deploy.xml on Ubuntu 14 all passed smoothly, but for Ubuntu 16.04.2 the error showed up (default python 3.5.2)

The fix by @zodiacfireworks has sovled the issue, thanks!

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

3 participants