diff --git a/python/.changelog.d/noissue.fixed b/python/.changelog.d/noissue.fixed new file mode 100644 index 0000000000..8ffbc3f5c4 --- /dev/null +++ b/python/.changelog.d/noissue.fixed @@ -0,0 +1 @@ +Fixed dependency error when running trezorctl without PIL. diff --git a/python/src/trezorlib/debuglink.py b/python/src/trezorlib/debuglink.py index f9fd54cf8a..103205b505 100644 --- a/python/src/trezorlib/debuglink.py +++ b/python/src/trezorlib/debuglink.py @@ -38,7 +38,6 @@ from typing import ( ) from mnemonic import Mnemonic -from PIL import Image from . import mapping, messages, protobuf from .client import TrezorClient @@ -255,6 +254,8 @@ class DebugLink: self.save_screenshot_for_t1() def save_screenshot_for_t1(self) -> None: + from PIL import Image + layout = self.state().layout assert layout is not None assert len(layout) == 128 * 64 // 8