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

Missing dependency: pyyaml #986

Closed
ccoors opened this issue Mar 24, 2021 · 3 comments · Fixed by #987
Closed

Missing dependency: pyyaml #986

ccoors opened this issue Mar 24, 2021 · 3 comments · Fixed by #987
Labels

Comments

@ccoors
Copy link

ccoors commented Mar 24, 2021

Describe the bug
python-miio imports yaml, but pyyaml is not listed as a dependency.

Version information (please complete the following information):

  • OS: Linux
  • python-miio: 0.5.5.1

To Reproduce
Steps to reproduce the behavior:

  1. virtualenv venv
  2. source venv/bin/activate
  3. pip install python-miio
  4. Run miiocli or any other command:
$ miiocli
Traceback (most recent call last):
  File "venv/bin/miiocli", line 5, in <module>
    from miio.cli import create_cli
  File "venv/lib/python3.9/site-packages/miio/__init__.py", line 40, in 
    from miio.gateway import Gateway
  File "venv/lib/python3.9/site-packages/miio/gateway/__init__.py", line
    from .alarm import Alarm
  File "venv/lib/python3.9/site-packages/miio/gateway/alarm.py", line 8,
    from .gatewaydevice import GatewayDevice
  File "venv/lib/python3.9/site-packages/miio/gateway/gatewaydevice.py",
    from .gateway import Gateway
  File "venv/lib/python3.9/site-packages/miio/gateway/gateway.py", line 
    import yaml
ModuleNotFoundError: No module named 'yaml'

Expected behavior
The pyyaml package is installed during pip install python-miio.

@rytilahti
Copy link
Owner

Created a new PR to add the dependency & will do a 0.5.5.2 release shortly, thanks for reporting!

@starkillerOG
Copy link
Contributor

Sorry that is my fault, I use pyyaml so much i forgot that you actually need to install it and it does not come by default.

@rytilahti
Copy link
Owner

@starkillerOG no worries! It'd be great if you could add a couple of tests to gateway (e.g., verifying that the shipped subdevices file is correctly read by the implementation) next time you work on that code. That'll help catching this sort of issues and potential other issues like incorrectly formatted yaml files :-)

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

Successfully merging a pull request may close this issue.

3 participants