Bellows CLI scan results in error if no channels are specified ("AttributeError: 'list' object has no attribute 'split'")
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
The traceback points to the channel conversion in bellows/cli/util.py, where the default list reaches code that calls split(). Start by reading that converter and the scan command's channel option. Reproduce with bellows scan -e and compare with an explicit -C list; done when scanning without a channel list no longer raises the AttributeError.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hello, thank you for the work on this library!
The bellows CLI scan command raises an AttributeError when no channels list is specified. When the channels list is specified, the command works properly.
Version and environment information:
bash-5.1# uname -a
Linux homeassistant 5.10.17-v8 #1 SMP PREEMPT Sat Sep 4 00:55:46 UTC 2021 aarch64 Linux
bash-5.1# python --version
Python 3.9.6
bash-5.1# pip3 --version
pip 20.2.4 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
bash-5.1# pip3 show bellows
Name: bellows
Version: 0.27.0
Summary: Library implementing EZSP
Home-page: http://github.com/zigpy/bellows
Author: Russell Cloran
Author-email: [email protected]
License: GPL-3.0
Location: /usr/local/lib/python3.9/site-packages
Requires: pyserial-asyncio, pure-pcapy3, voluptuous, pyserial, zigpy, click-log, click
Required-by:
Example of the error:
bash-5.1# export EZSP_DEVICE=/dev/ttyUSB1
bash-5.1# bellows scan -e
Traceback (most recent call last):
File "/usr/local/bin/bellows", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1137, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1062, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1666, in invoke
sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 923, in make_context
self.parse_args(ctx, args)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1379, in parse_args
value, args = param.handle_parse_result(ctx, opts, args)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 2364, in handle_parse_result
value = self.process_value(ctx, value)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 2320, in process_value
value = self.type_cast_value(ctx, value)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 2307, in type_cast_value
return convert(value)
File "/usr/local/lib/python3.9/site-packages/click/types.py", line 75, in __call__
return self.convert(value, param, ctx)
File "/usr/local/lib/python3.9/site-packages/bellows/cli/util.py", line 22, in convert
values = [self.intrange.convert(v, param, ctx) for v in value.split(",")]
AttributeError: 'list' object has no attribute 'split'
Example without the error:
bash-5.1# bellows scan -e -C 11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26
Scanning channels 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
[11, -70]
[12, -73]
[13, -67]
[14, -76]
[15, -73]
[16, -72]
[17, -76]
[18, -78]
[19, -73]
[20, -78]
[21, -60]
[22, -40]
[23, -40]
[24, -77]
[25, -71]
[26, -76]
- Ngôn ngữ chính
- Python
- Star
- 221
- Fork
- 104
- Merge trung bình
- 5 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của zigpy/bellows
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 15/100
-
Stale NCP source route is never invalidated after SOURCE_ROUTE_FAILURE; end device unreachable until re-pairCó thể đã có người làm @puddly đã nhận 5 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Tất cả issue của zigpy/bellows
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
volcengine/OpenViking#8432 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Failed chat turns are passed to the follow-up rewrite as completed historyCó thể đã có người làm @hskhyl đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
NVIDIA/auto-ontology#683 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Implement parse_url and accept http URLs for Pear backendCó thể đã có người làm @muskan-creates352 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
fedora-infra/anitya#2231 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
MarkdownDocSerializer.post_process escapes '\<' to '\<', rendering literal '<' in CommonMarkĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
docling-project/docling-core#1067 ·
Maintainer thường phản hồi trong vòng 3 ngày