question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't run tutorial under Debian 10 in WSL2

See original GitHub issue

Describe the bug New user; just signed up. Logged into https://datapane.com/home/ and followed instructions.

To Reproduce

  1. Start Debian 10 under WSL2 on Windows 10
  2. goto https://datapane.com/home/
  3. Copy script to rept.py
  4. Do this:
sudo apt update
sudo apt install -y python3-pip
sudo apt install build-essential libssl-dev libffi-dev python3-dev
pip3 install datapane
python3 ./rept.py
  1. Get error

Expected behavior Per the instructions, I should be able to refresh that page and see results.

Screenshots Error from running rept.py

Connected successfully to https://datapane.com as cek
Publishing report and associated data - please wait..
Traceback (most recent call last):
  File "./rept.py", line 26, in <module>
    r.publish(name=f'COVID-19 in {" ".join(locations.iso_code)}', open=True, tweet=True, description=f'COVID-19 in {", ".join(locations.location)}')
  File "/home/tig/.local/lib/python3.7/site-packages/datapane/client/api/report.py", line 384, in publish
    res = Resource(self.endpoint).post_files(dict(attachments=attachments), document=report_str, **kwargs)
  File "/home/tig/.local/lib/python3.7/site-packages/datapane/client/api/common.py", line 204, in post_files    e = MultipartEncoder(fields=fields)
  File "/home/tig/.local/lib/python3.7/site-packages/requests_toolbelt/multipart/encoder.py", line 125, in __init__
    self._prepare_parts()
  File "/home/tig/.local/lib/python3.7/site-packages/requests_toolbelt/multipart/encoder.py", line 246, in _prepare_parts
    self.parts = [Part.from_field(f, enc) for f in self._iter_fields()]
  File "/home/tig/.local/lib/python3.7/site-packages/requests_toolbelt/multipart/encoder.py", line 246, in <listcomp>
    self.parts = [Part.from_field(f, enc) for f in self._iter_fields()]
  File "/home/tig/.local/lib/python3.7/site-packages/requests_toolbelt/multipart/encoder.py", line 495, in from_field
    return cls(headers, body)
  File "/home/tig/.local/lib/python3.7/site-packages/requests_toolbelt/multipart/encoder.py", line 488, in __init__
    self.len = len(self.headers) + total_len(self.body)
  File "/home/tig/.local/lib/python3.7/site-packages/requests_toolbelt/multipart/encoder.py", line 432, in total_len
    if hasattr(o, 'len'):
  File "/home/tig/.local/lib/python3.7/site-packages/requests_toolbelt/multipart/encoder.py", line 573, in len
    return total_len(self.fd) - self.fd.tell()
  File "/home/tig/.local/lib/python3.7/site-packages/requests_toolbelt/multipart/encoder.py", line 441, in total_len
    return os.fstat(fileno).st_size
FileNotFoundError: [Errno 2] No such file or directory

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Edge
  • Python: 3.7.3

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mandscommented, Jun 6, 2021

Ok - thanks for raising - will look into reproducing and resolving

1reaction
votticommented, Jun 3, 2021

Hi,

I have experienced the same error with Ubuntu 20.04.1 LTS in WSL2 when running the example on Jupyter in a folder located in the mounted Windows file system.

Runnig it from Jupyter in the Ubuntu partition fixes the issue for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Install Debian on WSL2 Windows 10 - YouTube
How to Install Debian on WSL2 Windows 10 | Installing Debian on Windows Subsystem for Linux 2 WSL2 Debian Install | Debian Windows...
Read more >
InstallingDebianOn/Microsoft/Windows/SubsystemForLinux
Guides on how to install Debian/Linux on a Microsoft. ... kernel (WSL1) or Hyper-V with the new WSL2 interface depending on your Windows...
Read more >
Troubleshooting Windows Subsystem for Linux | Microsoft Learn
Provides detailed information about common errors and issues people run into while running Linux on the Windows Subsystem for Linux.
Read more >
Install Ubuntu on WSL2 on Windows 10
Windows Subsystem for Linux (WSL) allows you to install a complete Ubuntu ... In this tutorial, we'll show you how to get up...
Read more >
WSL2: The Complete Guide for Windows 10 & 11 - SitePoint
The Windows Subsystem for Linux (WSL) lets developers run a Linux environment directly on Windows. It's a full Linux OS running inside Windows ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found