Can't run tutorial under Debian 10 in WSL2
See original GitHub issueDescribe the bug New user; just signed up. Logged into https://datapane.com/home/ and followed instructions.
To Reproduce
- Start Debian 10 under WSL2 on Windows 10
- goto https://datapane.com/home/
- Copy script to
rept.py
- 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
- 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:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok - thanks for raising - will look into reproducing and resolving
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.