sugarlabs / cartoon-builder

GNU General Public License v2.0
1 stars 9 forks source link

dist_xo fails with non-zero exit status #12

Open srevinsaju opened 4 years ago

srevinsaju commented 4 years ago
Error while building Cartoon Builder (/home/runner/work/sugar-activity-build/sugar-activity-build/activities/repos/sugarlabs/cartoon-builder/activity/activity.info) E: /home/runner/work/sugar-activity-build/sugar-activity-build/activities/repos/sugarlabs/cartoon-builder/po/hus.po:184: duplicate message definition...
/home/runner/work/sugar-activity-build/sugar-activity-build/activities/repos/sugarlabs/cartoon-builder/po/hus.po:182: ...this is the location of the first definition
msgfmt: found 1 fatal error
Traceback (most recent call last):
  File "setup.py", line 18, in <module>
    bundlebuilder.start()
  File "/usr/lib/python3.6/dist-packages/sugar3/activity/bundlebuilder.py", line 633, in start
    globals()['cmd_' + options.command](config, options)
  File "/usr/lib/python3.6/dist-packages/sugar3/activity/bundlebuilder.py", line 484, in cmd_dist_xo
    packager = XOPackager(Builder(config, no_fail))
  File "/usr/lib/python3.6/dist-packages/sugar3/activity/bundlebuilder.py", line 243, in __init__
    self.builder.build_locale()
  File "/usr/lib/python3.6/dist-packages/sugar3/activity/bundlebuilder.py", line 159, in build_locale
    cat = gettext.GNUTranslations(open(mo_file, 'rb'))
FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/sugar-activity-build/sugar-activity-build/activities/repos/sugarlabs/cartoon-builder/locale/hus/LC_MESSAGES
Saumya-Mishra9129 commented 4 years ago

Thanks I am marking this also in my to-do for python3 port.

Saumya-Mishra9129 commented 4 years ago

Thanks I am marking this also in my to-do for python3 port.

My bad. The error was n't because of python3 port. I couldn't figure out what is the reason. It can be seen in many activities. I tested with Ubuntu 20.04.

@chimosky @quozl @JuiP Please share if anyone of you know.

srevinsaju commented 4 years ago

its something related to translations afaik. Maybe the translation file got deleted, or need to be refreshed: https://translate.sugarlabs.org/

quozl commented 4 years ago

Error message wrapped and irrelevant path components removed;

E: .../cartoon-builder/po/hus.po:184: duplicate message definition...
.../cartoon-builder/po/hus.po:182: ...this is the location of the first definition
msgfmt: found 1 fatal error

Software in translate.sugarlabs.org is theoretically incapable of producing a duplicate, as the message is used as a unique database key. Cause of the duplication must be somewhere else. Perhaps the file that was uploaded to translate.sugarlabs.org before 2012 had the flaw. Correct place to fix it is translate.sugarlabs.org.