mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-21 03:30:10 +00:00
fix(scripts): correct can import check (#2937)
This commit is contained in:
@@ -45,7 +45,7 @@ from dataclasses import dataclass, field
|
|||||||
|
|
||||||
import draccus
|
import draccus
|
||||||
|
|
||||||
from lerobot.utils.import_utils import is_package_available
|
from lerobot.utils.import_utils import _can_available
|
||||||
|
|
||||||
MOTOR_NAMES = {
|
MOTOR_NAMES = {
|
||||||
0x01: "joint_1",
|
0x01: "joint_1",
|
||||||
@@ -336,7 +336,7 @@ def run_speed(cfg: CANSetupConfig):
|
|||||||
|
|
||||||
@draccus.wrap()
|
@draccus.wrap()
|
||||||
def setup_can(cfg: CANSetupConfig):
|
def setup_can(cfg: CANSetupConfig):
|
||||||
if not is_package_available("can"):
|
if not _can_available:
|
||||||
print("Error: python-can not installed. Install with: pip install python-can")
|
print("Error: python-can not installed. Install with: pip install python-can")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user