dash-uploader
dash-uploader copied to clipboard
Dash-uploader adds empty line to files, seems a dependency issue
I am running to a strange error. After uploading the files the files start with an empty line. I get this behaviour with the same version of dash-uploader.
Before:
"""
<?xml version="1.0" encoding="ISO-8859-1"?>
<mzXML xmlns="http://sashimi.sourceforge.net/schema_revision/mzXML_3.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://sashimi.sourceforge.net/schema_revision/mzXML_3.2 http://sashimi.sourceforge.net/schema_revision/mzXML_3.2/mzXML_idx_3.2.xsd">
<msRun scanCount="989" startTime="PT0.57413S" endTime="PT721.539S">
<parentFile fileName="file:///D:\QEHF\LRG\Thomas\2018_01_04TR/2017_12_22TR_HILICneg15_CLS_P5_2017_11_26_T4_I681.raw"
fileType="RAWData"
fileSha1="6fcdc80c069b7be9743a63a229e02fc3ec6447e2"/>
<msInstrument msInstrumentID="1">
...
"""
After:
"""
<?xml version="1.0" encoding="ISO-8859-1"?>
<mzXML xmlns="http://sashimi.sourceforge.net/schema_revision/mzXML_3.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://sashimi.sourceforge.net/schema_revision/mzXML_3.2 http://sashimi.sourceforge.net/schema_revision/mzXML_3.2/mzXML_idx_3.2.xsd">
<msRun scanCount="989" startTime="PT0.57413S" endTime="PT721.539S">
<parentFile fileName="file:///D:\QEHF\LRG\Thomas\2018_01_04TR/2017_12_22TR_HILICneg15_CLS_P5_2017_11_26_T4_I681.raw"
fileType="RAWData"
fileSha1="6fcdc80c069b7be9743a63a229e02fc3ec6447e2"/>
<msInstrument msInstrumentID="1">
...
"""
Versions, adding empty line after upload:
- dash==2.9.3
- dash-bootstrap-components==1.4.1
- dash-core-components==2.0.0
- dash-extensions==0.1.3
- dash-html-components==2.0.0
- dash-table==5.0.0
- dash-tabulator==0.4.2
- dash-uploader==0.7.0a1
Versions, files unchanged (expected behaviour):
- dash==2.8.1
- dash-bootstrap-components==1.4.0
- dash-core-components==2.0.0
- dash-extensions==0.1.3
- dash-html-components==2.0.0
- dash-table==5.0.0
- dash-tabulator==0.4.2
- dash-uploader==0.7.0a1
The behaviour might come from some other libraries installed.
In addition, new lines are introduced inside the uploaded files:
</binaryDataArray>
</binaryDataArrayList>
</spectrum>
<sp
ectrum index="1154" id="controllerType=0 controllerNumber=1 scan=1155" defaultArrayLength="894">
<cvParam cvRef="MS" accession="MS:1000511" name="ms level" value="1"/>
<cvParam cvRef="MS" accession="MS:1000129" name="negative scan" value=""/>
<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value=""/>
Should be:
</binaryDataArray>
</binaryDataArrayList>
</spectrum>
<spectrum index="1154" id="controllerType=0 controllerNumber=1 scan=1155" defaultArrayLength="894">
<cvParam cvRef="MS" accession="MS:1000511" name="ms level" value="1"/>
<cvParam cvRef="MS" accession="MS:1000129" name="negative scan" value=""/>
<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value=""/>
Setting the chunksize to 50 removes the empty lines within the files but keeps the empty line in the beginning. One file is around 10 - 20 MB.
Using werkzeug==2.2.3 seems to fix it.
If you can find a minimal reproducing example with Werkzeug only, can you report it there? This is the second report I've seen of this, but I can't reproduce it with a simple example.
Reported at https://github.com/pallets/werkzeug/issues/2675