Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSV file is downloaded with XLS suffix #8019

Closed
stefansimik opened this issue Mar 9, 2020 · 9 comments
Closed

CSV file is downloaded with XLS suffix #8019

stefansimik opened this issue Mar 9, 2020 · 9 comments
Labels
status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Milestone

Comments

@stefansimik
Copy link
Contributor

stefansimik commented Mar 9, 2020

Description

Hi, latest JupyterLab v2.0.1
has bad behavior when downloading .csv file from FileBrowser.

Instead of downloading the file with *.csv suffix, it downloads the file with *.xls suffix.
Download file is no Excel file of course, it is just saved with invalid *.xls suffix, which should not happen.

Reproduce

See image below (zoom if needed)

File diamonds.csv - in case you want to try with same file:

Expected behavior

CSV file should be saved with original *.csv suffix (not with *.xls suffix)

Context

  • Operating System and version: Win 10
  • Browser and version: Chrome
  • JupyterLab version: 2.0.1
Troubleshoot Output
$PATH:
	D:\bin\Miniconda3\envs\reporting_py38
	D:\bin\Miniconda3\envs\reporting_py38\Library\mingw-w64\bin
	D:\bin\Miniconda3\envs\reporting_py38\Library\usr\bin
	D:\bin\Miniconda3\envs\reporting_py38\Library\bin
	D:\bin\Miniconda3\envs\reporting_py38\Scripts
	D:\bin\Miniconda3\envs\reporting_py38\bin
	D:\bin\Miniconda3\condabin
	C:\Sybase\shared\Sybase Central 6.1.0\win64
	C:\Sybase\IQ-15_4\Bin64
	C:\Sybase\IQ-15_4\Bin32
	C:\Program Files (x86)\Intel\iCLS Client
	C:\Program Files\Intel\iCLS Client
	C:\Windows\system32
	C:\Windows
	C:\Windows\System32\Wbem
	C:\Windows\System32\WindowsPowerShell\v1.0
	C:\Program Files\Intel\Intel(R) Management Engine Components\DAL
	C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL
	C:\Program Files\Intel\Intel(R) Management Engine Components\IPT
	C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT
	C:\Program Files (x86)\CheckPoint\Endpoint Security\Endpoint Common\bin
	C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
	C:\Program Files\Git\cmd
	C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn
	C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn
	C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn
	C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio
	C:\WINDOWS\system32
	C:\WINDOWS
	C:\WINDOWS\System32\Wbem
	C:\WINDOWS\System32\WindowsPowerShell\v1.0
	C:\WINDOWS\System32\OpenSSH
	C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR
	D:\bin\Miniconda3
	D:\bin\Miniconda3\Scripts
	C:\Users\simik\AppData\Local\Microsoft\WindowsApps

sys.path:
D:\bin\Miniconda3\envs\reporting_py38\Scripts
D:\bin\Miniconda3\envs\reporting_py38\python38.zip
D:\bin\Miniconda3\envs\reporting_py38\DLLs
D:\bin\Miniconda3\envs\reporting_py38\lib
D:\bin\Miniconda3\envs\reporting_py38
D:\bin\Miniconda3\envs\reporting_py38\lib\site-packages
D:\bin\Miniconda3\envs\reporting_py38\lib\site-packages\win32
D:\bin\Miniconda3\envs\reporting_py38\lib\site-packages\win32\lib
D:\bin\Miniconda3\envs\reporting_py38\lib\site-packages\Pythonwin

sys.executable:
D:\bin\Miniconda3\envs\reporting_py38\python.exe

sys.version:
3.8.2 | packaged by conda-forge | (default, Mar 5 2020, 17:29:01) [MSC v.1916 64 bit (AMD64)]

platform.platform():
Windows-10-10.0.17763-SP0

where jupyter:
D:\bin\Miniconda3\envs\reporting_py38\Scripts\jupyter.exe

D:\bin\Miniconda3\Scripts\jupyter.exe

pip list:
Package Version

--------------------------------- -------------------

attrs                             19.3.0             

backcall                          0.1.0              

bleach                            3.1.1              

certifi                           2019.11.28         

colorama                          0.4.3              

cycler                            0.10.0             

decorator                         4.4.2              

defusedxml                        0.6.0              

entrypoints                       0.3                

et-xmlfile                        1.0.1              

importlib-metadata                1.5.0              

ipykernel                         5.1.4              

ipython                           7.13.0             

ipython-genutils                  0.2.0              

jdcal                             1.4.1              

jedi                              0.16.0             

Jinja2                            2.11.1             

json5                             0.9.0              

jsonschema                        3.2.0              

jupyter-client                    6.0.0              

jupyter-contrib-core              0.3.3              

jupyter-contrib-nbextensions      0.5.1              

jupyter-core                      4.6.3              

jupyter-highlight-selected-word   0.2.0              

jupyter-latex-envs                1.4.4              

jupyter-nbextensions-configurator 0.4.1              

jupyterlab                        2.0.1              

jupyterlab-server                 1.0.7              

kiwisolver                        1.1.0              

lxml                              4.5.0              

MarkupSafe                        1.1.1              

matplotlib                        3.2.0              

mistune                           0.8.4              

nbconvert                         5.6.1              

nbformat                          5.0.4              

notebook                          6.0.3              

numpy                             1.18.1             

openpyxl                          3.0.3              

pandas                            1.0.1              

pandocfilters                     1.4.2              

parso                             0.6.2              

pickleshare                       0.7.5              

pip                               20.0.2             

plotly                            4.5.3              

prometheus-client                 0.7.1              

prompt-toolkit                    3.0.4              

Pygments                          2.5.2              

pyodbc                            4.0.28             

pyparsing                         2.4.6              

PyQt5                             5.12.3             

PyQt5-sip                         4.19.18            

PyQtWebEngine                     5.12.1             

pyrsistent                        0.15.7             

python-dateutil                   2.8.1              

pytz                              2019.3             

pywin32                           227                

pywinpty                          0.5.7              

PyYAML                            5.3                

pyzmq                             19.0.0             

retrying                          1.3.3              

schedule                          0.6.0              

scipy                             1.3.2              

Send2Trash                        1.5.0              

setuptools                        45.2.0.post20200209

six                               1.14.0             

terminado                         0.8.3              

testpath                          0.4.4              

tornado                           6.0.4              

traitlets                         4.3.3              

wcwidth                           0.1.8              

webencodings                      0.5.1              

wheel                             0.34.2             

wincertstore                      0.2                

xlrd                              1.2.0              

zipp                              3.1.0

conda list:
# packages in environment at D:\bin\Miniconda3\envs\reporting_py38:

#

# Name                    Version                   Build  Channel

attrs                     19.3.0                     py_0    conda-forge

backcall                  0.1.0                      py_0    conda-forge

bleach                    3.1.1                      py_0    conda-forge

ca-certificates           2019.11.28           hecc5488_0    conda-forge

certifi                   2019.11.28               py38_0    conda-forge

colorama                  0.4.3                      py_0    conda-forge

cycler                    0.10.0                     py_2    conda-forge

decorator                 4.4.2                      py_0    conda-forge

defusedxml                0.6.0                      py_0    conda-forge

entrypoints               0.3                   py38_1000    conda-forge

et_xmlfile                1.0.1                   py_1001    conda-forge

freetype                  2.10.0               h563cfd7_1    conda-forge

icc_rt                    2019.0.0             h0cc432a_1  

icu                       64.2                 he025d50_1    conda-forge

importlib_metadata        1.5.0                    py38_0    conda-forge

intel-openmp              2020.0                      166  

ipykernel                 5.1.4            py38h5ca1d4c_0    conda-forge

ipython                   7.13.0           py38h5ca1d4c_0    conda-forge

ipython_genutils          0.2.0                      py_1    conda-forge

jdcal                     1.4.1                      py_0    conda-forge

jedi                      0.16.0                   py38_0    conda-forge

jinja2                    2.11.1                     py_0    conda-forge

jpeg                      9c                hfa6e2cd_1001    conda-forge

json5                     0.9.0                      py_0    conda-forge

jsonschema                3.2.0                    py38_0    conda-forge

jupyter_client            6.0.0                      py_0    conda-forge

jupyter_contrib_core      0.3.3                      py_2    conda-forge

jupyter_contrib_nbextensions 0.5.1                    py38_0    conda-forge

jupyter_core              4.6.3                    py38_0    conda-forge

jupyter_highlight_selected_word 0.2.0                 py38_1000    conda-forge

jupyter_latex_envs        1.4.4                 py38_1000    conda-forge

jupyter_nbextensions_configurator 0.4.1                    py38_0    conda-forge

jupyterlab                2.0.1                      py_0    conda-forge

jupyterlab_server         1.0.7                      py_0    conda-forge

kiwisolver                1.1.0            py38he980bc4_0    conda-forge

libblas                   3.8.0                    15_mkl    conda-forge

libcblas                  3.8.0                    15_mkl    conda-forge

libclang                  9.0.1           default_hf44288c_0    conda-forge

libiconv                  1.15              hfa6e2cd_1005    conda-forge

liblapack                 3.8.0                    15_mkl    conda-forge

libpng                    1.6.37               h7602738_0    conda-forge

libsodium                 1.0.17               h2fa13f4_0    conda-forge

libxml2                   2.9.10               h9ce36c8_0    conda-forge

libxslt                   1.1.33               heafd4d3_0    conda-forge

lxml                      4.5.0            py38heafd4d3_0    conda-forge

m2w64-gcc-libgfortran     5.3.0                         6  

m2w64-gcc-libs            5.3.0                         7  

m2w64-gcc-libs-core       5.3.0                         7  

m2w64-gmp                 6.1.0                         2  

m2w64-libwinpthread-git   5.0.0.4634.697f757               2  

markupsafe                1.1.1            py38hfa6e2cd_0    conda-forge

matplotlib                3.2.0                         1    conda-forge

matplotlib-base           3.2.0            py38h2981e6d_1    conda-forge

mistune                   0.8.4           py38hfa6e2cd_1000    conda-forge

mkl                       2020.0                      166  

msys2-conda-epoch         20160418                      1  

nbconvert                 5.6.1                    py38_0    conda-forge

nbformat                  5.0.4                      py_0    conda-forge

nodejs                    13.9.0                        0    conda-forge

notebook                  6.0.3                    py38_0    conda-forge

numpy                     1.18.1           py38hc71023c_0    conda-forge

openpyxl                  3.0.3                      py_0    conda-forge

openssl                   1.1.1d               hfa6e2cd_0    conda-forge

pandas                    1.0.1            py38he350917_0    conda-forge

pandoc                    2.9.2                         0    conda-forge

pandocfilters             1.4.2                      py_1    conda-forge

parso                     0.6.2                      py_0    conda-forge

pickleshare               0.7.5                 py38_1000    conda-forge

pip                       20.0.2                     py_2    conda-forge

plotly                    4.5.3                      py_0    conda-forge

prometheus_client         0.7.1                      py_0    conda-forge

prompt-toolkit            3.0.4                      py_0    conda-forge

prompt_toolkit            3.0.4                         0    conda-forge

pygments                  2.5.2                      py_0    conda-forge

pyodbc                    4.0.28           py38h6538335_0    conda-forge

pyparsing                 2.4.6                      py_0    conda-forge

pyqt                      5.12.3           py38h6538335_1    conda-forge

pyqt5-sip                 4.19.18                  pypi_0    pypi

pyqtwebengine             5.12.1                   pypi_0    pypi

pyrsistent                0.15.7           py38hfa6e2cd_0    conda-forge

python                    3.8.2           h5fd99cc_4_cpython    conda-forge

python-dateutil           2.8.1                      py_0    conda-forge

pytz                      2019.3                     py_0    conda-forge

pywin32                   227              py38hfa6e2cd_0    conda-forge

pywinpty                  0.5.7                    py38_0    conda-forge

pyyaml                    5.3              py38hfa6e2cd_0    conda-forge

pyzmq                     19.0.0           py38h16f9016_0    conda-forge

qt                        5.12.5               h7ef1ec2_0    conda-forge

retrying                  1.3.3                      py_2    conda-forge

schedule                  0.6.0                    pypi_0    pypi

scipy                     1.3.2            py38h582fac2_0    conda-forge

send2trash                1.5.0                      py_0    conda-forge

setuptools                45.2.0                   py38_0    conda-forge

six                       1.14.0                   py38_0    conda-forge

sqlite                    3.30.1               hfa6e2cd_0    conda-forge

terminado                 0.8.3                    py38_0    conda-forge

testpath                  0.4.4                      py_0    conda-forge

tornado                   6.0.4            py38hfa6e2cd_0    conda-forge

traitlets                 4.3.3                    py38_0    conda-forge

vc                        14.1                 h0510ff6_4  

vs2015_runtime            14.16.27012          hf0eaf9b_1  

wcwidth                   0.1.8                      py_0    conda-forge

webencodings              0.5.1                      py_1    conda-forge

wheel                     0.34.2                     py_1    conda-forge

wincertstore              0.2                   py38_1003    conda-forge

winpty                    0.4.3                         4    conda-forge

xlrd                      1.2.0                      py_0    conda-forge

yaml                      0.2.2                hfa6e2cd_1    conda-forge

zeromq                    4.3.2                h6538335_2    conda-forge

zipp                      3.1.0                      py_0    conda-forge

zlib                      1.2.11            h2fa13f4_1006    conda-forge
@jasongrout
Copy link
Contributor

I just tried this with your diamonds.csv file, on macos and firefox 73 and chrome 80, and it downloaded a file named "diamonds.csv", just like is expected.

My guess is it has something to do with how things are set up in windows and microsoft office? Does it have the wrong filename if you try from a different browser?

@jasongrout
Copy link
Contributor

And just checking - is this in a clean environment with no jupyterlab extensions installed, and no browser extensions installed? (See the issue reporting guidelines at https://jupyterlab.readthedocs.io/en/stable/getting_started/issue.html)

@stefansimik
Copy link
Contributor Author

stefansimik commented Mar 9, 2020

Going to check... I am back soon with answers... and better report here.

Question 1:

My guess is it has something to do with how things are set up in windows and
microsoft office? Does it have the wrong filename if you try from a different browser?

Answer 1:

  • I can confirm, that the problem occurs using Win10 + Chrome v80.0.3987.132
  • I can confirm - the same problem happens with Microsoft Edge browser (build 18362)
  • When I tried the same with Firefox v73.0.1 - it works correctly = *.csv file was downloaded.

@jasongrout jasongrout added this to the Reference milestone Mar 9, 2020
@stefansimik
Copy link
Contributor Author

stefansimik commented Mar 9, 2020

Question 2:

How the problems occurs in clean environment?
(See the issue reporting guidelines at https://jupyterlab.readthedocs.io/en/stable/getting_started/issue.html)

Answer 2:

  • Using the clean 'jlab-test' environment:
    • in jupyter lab: the problem still happens on Win10 using Chrome latest (without any jupyter lab extensions installed). That means, *.xls file was downloaded.
    • in jupyter notebook: there is no problem (*.csv downloaded)
  • clean 'jlab-test' environment + private browsing mode (in Chrome):
    • Problem still happens in Private browsing mode using Chrome = *.xls downloaded

It is clear, that there is no browser extension and no jupyterlab-extension involved. Problem happens in clean jupyterlab on Win10 and Chrome / Edge browsers.. It is easily reproducible, happens reliably every time on my side.

@jasongrout
Copy link
Contributor

jasongrout commented Mar 9, 2020

Thanks. That's especially helpful to note that it is not happening with classic notebook. Does it happen in other browsers besides Chrome? (sorry, didn't see you had posted two answers above).

What happens if you rename the file to have a .tsv extension, just curious?

To anyone else, does anyone else see this problem?

@stefansimik
Copy link
Contributor Author

stefansimik commented Mar 9, 2020

Just tested:
diamonds.tsv file is correctly downloaded to diamonds.tsv file in download.

So it looks like, there is some special relation to bad handling of *.csv suffix only.
Other suffixes (like *.tsv) look like working correctly.

(I edited and extended my reponses above multiple times (sorry for confusion) - now mentioning, that problem happens not only in Chrome, but also in Edge browser - same bad behavior, where *.csv file is downloaded with *.xls suffix.

Firefox is works correctly every time.

@jasongrout
Copy link
Contributor

In particular, your links indicate this is not a JupyterLab issue.

@stefansimik
Copy link
Contributor Author

Yes, it's right.
It look like it is really not a JupyterLab issue, but issue related to combination of

  • Win10
  • Chrome browser
  • and MS Office configuration

There is nothing, what could be solved by Jupyter project
and issue can be closed.

@lock lock bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Apr 15, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

No branches or pull requests

2 participants