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

LocalClient fails to initialize with python3 #24750

Closed
goshlanguage opened this issue Jun 17, 2015 · 5 comments
Closed

LocalClient fails to initialize with python3 #24750

goshlanguage opened this issue Jun 17, 2015 · 5 comments
Labels
Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt won't-fix legitimate issue, but won't fix
Milestone

Comments

@goshlanguage
Copy link

I have the latest stable of Salt currently, along with the 2015.5.2 version of salt installed via pip.
When initializing LocalClient(), an exception is thrown and I'm not sure what the correct fix is:

>>> import salt.client
>>> local = salt.client.LocalClient()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/project/venv/lib/python3.4/site-packages/salt/client/__init__.py", line 126, in __init__
    self.opts = salt.config.client_config(c_path)
  File "/project/venv/lib/python3.4/site-packages/salt/config.py", line 2199, in client_config
    master_config(path, defaults=defaults)
  File "/project/venv/lib/python3.4/site-packages/salt/config.py", line 2041, in master_config
    opts = apply_master_config(overrides, defaults)
  File "/project/venv/lib/python3.4/site-packages/salt/config.py", line 2082, in apply_master_config
    cache_minion_id=None)
  File "/project/venv/lib/python3.4/site-packages/salt/config.py", line 1938, in get_id
    newid = salt.utils.network.generate_minion_id()
  File "/project/venv/lib/python3.4/site-packages/salt/utils/network.py", line 274, in generate_minion_id
    in salt.utils.network.ip_addrs(include_loopback=True)
  File "/project/venv/lib/python3.4/site-packages/salt/utils/network.py", line 846, in ip_addrs
    else interfaces()
  File "/project/venv/lib/python3.4/site-packages/salt/utils/network.py", line 693, in interfaces
    return linux_interfaces()
  File "/project/venv/lib/python3.4/site-packages/salt/utils/network.py", line 580, in linux_interfaces
    ifaces = _interfaces_ip(cmd1 + '\n' + cmd2)
TypeError: can't concat bytes to str

I could probably try casting cmd1 and cmd2 via network.py, but I did want to raise this issue before I mess with it, as I'd be at best guessing.

Thanks for any help you can provide.

@rallytime
Copy link
Contributor

@RyanHartje Salt does not presently (2015.5.x releases and older) run on Python3 because of a couple of hard dependencies in Salt. However, I beleive we are working towards Python 3 support for the next feature release, Beryllium. Do I have that correct, @msteed?

@rallytime rallytime added Bug broken, incorrect, or confusing behavior won't-fix legitimate issue, but won't fix Core relates to code central or existential to Salt labels Jun 17, 2015
@rallytime rallytime added this to the Blocked milestone Jun 17, 2015
@goshlanguage
Copy link
Author

Thank you for the feedback @rallytime, I overlooked that.

@msteed
Copy link
Contributor

msteed commented Jun 17, 2015

We are making progress towards Python 3 compatibility but I am not sure when it will ship. Soon we will be posting a document describing the py3 issues and how we are solving them, so interested parties will be able to help.

@FunTimeCoding
Copy link

awesome, python3 support is coming!

@cachedout
Copy link
Contributor

This actually works now! Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt won't-fix legitimate issue, but won't fix
Projects
None yet
Development

No branches or pull requests

5 participants