dwc2-for-klipper-socket icon indicating copy to clipboard operation
dwc2-for-klipper-socket copied to clipboard

Failed to get file list can't detect virtual sd card.

Open wormiedk opened this issue 4 years ago • 6 comments

I get the following in /tmp/dwc2.log ========== Started ========== ERROR:tornado.application:Exception in callback functools.partial(<bound method IOLoop._discard_future_result of <tornado.platform.asyncio.AsyncIOMainLoop ob ject at 0x760711f0>>, <Task finished coro=<read_stream() done, defined at /home/pi/dwc2-for-klipper-socket/web_dwc2.py:174> exception=TypeError("the JSON obj ect must be str, not 'bytes'",)>) Traceback (most recent call last): File "/home/pi/dwc-env/lib/python3.5/site-packages/tornado/ioloop.py", line 743, in _run_callback ret = callback() File "/home/pi/dwc-env/lib/python3.5/site-packages/tornado/ioloop.py", line 767, in _discard_future_result future.result() File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result raise self._exception File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step result = coro.send(None) File "/home/pi/dwc2-for-klipper-socket/web_dwc2.py", line 181, in read_stream out_ = json.loads(data[:-1]) File "/usr/lib/python3.5/json/__init__.py", line 312, in loads s.__class__.__name__)) TypeError: the JSON object must be str, not 'bytes'

wormiedk avatar Jan 20 '21 12:01 wormiedk

By doing what?

Stephan3 avatar Jan 20 '21 12:01 Stephan3

When launching DWC. The web interface hangs with the "failed to get file list" and "can't detect virtual sd card" messages Skærmbillede 2021-01-20 133849

wormiedk avatar Jan 20 '21 12:01 wormiedk

show us your klippy.log and dwc.log . we cant "guess"

Stephan3 avatar Jan 20 '21 13:01 Stephan3

Hello Same issue for me Klipper and dcw are launched by systemd

Added -a /tmp/klippy_uds in klipper.service

Added in config: (is that correct ?) [virtual_sdcard] path = /home/pi/sdcard

Klipper run well with octoprint (octopi distrib)

ScreenShot060

dwc2.log

klippy.log

Apar7777 avatar Jan 29 '21 00:01 Apar7777

Hello Same issue for me Klipper and dcw are launched by systemd

Added -a /tmp/klippy_uds in klipper.service

Added in config: (is that correct ?) [virtual_sdcard] path = /home/pi/sdcard

Klipper run well with octoprint (octopi distrib)

dwc2.log

klippy.log

looks correct to me. I il ltry your configuration locally.

Stephan3 avatar Jan 29 '21 14:01 Stephan3

Hey, maybe the original commenter didn't realise you have to setup the virtual sd card in klipper config not in dwc.cfg.

Had the same problem and adding this in klipper sorted it completely:

[virtual_sdcard]
path: /home/pi/sdcard/

adq avatar Apr 04 '21 14:04 adq