Page MenuHomePhabricator

Quarry XLSX cells for long urls are wrongly empty
Closed, ResolvedPublic

Description

Eg. https://quarry.wmflabs.org/query/21263:

Firefox_Screenshot_2017-09-07T16-06-45.212Z.png (3×1 px, 400 KB)

Download: https://quarry.wmflabs.org/run/202171/output/0/xlsx?download=true

LibreOffice Calc, Version 5.1.6.2 shows:
Screenshot from 2017-09-07 11-07-58.png (744×1 px, 194 KB)

Many cells are wrongly empty.

Event Timeline

The same happens with xlsxwriter 0.9.9 instead of 0.5.2.

Sep  7 16:42:41 jessie python[26945]: /srv/venv/local/lib/python2.7/site-packages/xlsxwriter/worksheet.py:831: UserWarning: Ignoring URL 'http://www.example.com/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' with link or location/anchor > 255 characters since it exceeds Excel's limit for URLS

Wait a moment, it's excel's bug???

This is raised in https://github.com/jmcnamara/XlsxWriter/blob/b4c4b499ffb3db8e0fa1b306880bcbcb3675fd4d/xlsxwriter/worksheet.py#L828

What do you think of forcing string instead of url when it is longer then 255 chars? This will affect formulas as well.

Wait a moment, it's excel's bug???

Yes, you can't possibly add urls longer than 255 chars apparently.

Change 376561 had a related patch set uploaded (by Zhuyifei1999; owner: Zhuyifei1999):
[analytics/quarry/web@master] output: Fallback to write_string when some error occur in write for xlsx

https://gerrit.wikimedia.org/r/376561

Change 376561 merged by jenkins-bot:
[analytics/quarry/web@master] output: Fallback to write_string when some error occur in write for xlsx

https://gerrit.wikimedia.org/r/376561

Mentioned in SAL (#wikimedia-cloud) [2017-09-08T18:06:42Z] <zhuyifei1999_> Deployed d9e8a4a to quarry-main-01 T175285

Should be resolved. Such text are no longer written as a link but as basic string. Please reopen if there are issues.