joukos / PaperTTY

PaperTTY - Python module to render a TTY or VNC on e-ink
942 stars 101 forks source link

Getting error init() got an unexpected keyword argument 'vcom' when trying to run PaperTTY #123

Closed MykeHalk closed 7 months ago

MykeHalk commented 7 months ago

Hey I'm having trouble running PaperTTY on my Raspberry Pi Zero W with a Waveshare v2 mono display. When running the command "poetry run papertty --driver EPD2in13v2 terminal" I get this error -

gpiozero not found - defaulting to RPi.GPIO Loading PIL font /home/poop/PaperTTY/papertty/resources/tom-thumb.pil. Font size is ignored. Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/poop/.cache/pypoetry/virtualenvs/papertty-ocBzaH2G-py3.9/lib/python3.9/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/home/poop/.cache/pypoetry/virtualenvs/papertty-ocBzaH2G-py3.9/lib/python3.9/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/home/poop/.cache/pypoetry/virtualenvs/papertty-ocBzaH2G-py3.9/lib/python3.9/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/poop/.cache/pypoetry/virtualenvs/papertty-ocBzaH2G-py3.9/lib/python3.9/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/poop/.cache/pypoetry/virtualenvs/papertty-ocBzaH2G-py3.9/lib/python3.9/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/home/poop/.cache/pypoetry/virtualenvs/papertty-ocBzaH2G-py3.9/lib/python3.9/site-packages/click/decorators.py", line 33, in new_func return f(get_current_context().obj, *args, **kwargs) File "/home/poop/PaperTTY/papertty/papertty.py", line 1334, in terminal ptty = settings.get_init_tty() File "/home/poop/PaperTTY/papertty/papertty.py", line 1059, in get_init_tty tty.init_display() File "/home/poop/PaperTTY/papertty/papertty.py", line 249, in init_display self.driver.init(partial=self.partial, vcom=self.vcom, enable_a2=self.enable_a2, enable_1bpp=self.enable_1bpp, mhz=self.mhz) TypeError: init() got an unexpected keyword argument 'vcom'

Does anyone know what to do to fix this?

I'm using Raspberry Pi OS 32-bit Legacy Lite BTW

mcarr823 commented 7 months ago

I'll have a look at committing something, but the quick fix would be to update the init function of the partial driver. ie. Edit /home/poop/PaperTTY/papertty/drivers/drivers_partial.py and change def init(self, partial=True): to def init(self, partial=True, **kwargs):