catchpoint / WebPageTest.visual-metrics

Calculate visual performance metrics from a video (Speed Index, Visual Complete, Incremental progress, etc)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problems with Arabic Wikipedia for "hero" elements

soulgalore opened this issue · comments

Hi Patrick,
I've got a problem with testing the Arabic version of Wikipedia. The hero elements can't handle the arabic characters.

In the Visual Metrics log it looks like this:

14:57:17.282 - Calculating hero element times
14:57:17.282 - 'ascii' codec can't decode byte 0xd8 in position 96: ordinal not in range(128)
Traceback (most recent call last):
  File "/usr/src/app/node_modules/browsertime/vendor/visualmetrics.py", line 1880, in main
    options.herodata)
  File "/usr/src/app/node_modules/browsertime/vendor/visualmetrics.py", line 1342, in calculate_visual_metrics
    'value': calculate_hero_time(progress, dirs, hero, viewport)})
  File "/usr/src/app/node_modules/browsertime/vendor/visualmetrics.py", line 1543, in calculate_hero_time
    logging.debug('Target image for hero %s is %s' % (hero['name'], target_frame))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd8 in position 96: ordinal not in range(128)

I've tested directly on WebPageTest and get the same error there:
https://webpagetest.org/result/191211_J8_e69430ffc54e243dae4fa05d5de4b894/

Best
Peter