esitarski / CrossMgr

Cyclo Cross Management Application
MIT License
40 stars 20 forks source link

Unicode icons in GetResults.py break Windows SeriesMgr build #132

Closed kimble4 closed 5 months ago

kimble4 commented 5 months ago

The current Windows build of SeriesMgr dies on startup as it does not have the module BatchPublishAttrs. This appears to be because during the Windows build UpdateDependencies() chokes on the non-ASCII characters in GetResults.py and does not copy the subsequent modules in Dependencies.py.

You can see the error at https://github.com/esitarski/CrossMgr/actions/runs/8054377156/job/21999052611 line 2269:

Fixing dependencies for SeriesMgr
Traceback (most recent call last):
  File "D:\a\CrossMgr\CrossMgr\SeriesMgr\UpdateDependencies.py", line 26, in <module>
copying: Model.py
    UpdateDependencies()
  File "D:\a\CrossMgr\CrossMgr\SeriesMgr\UpdateDependencies.py", line 19, in UpdateDependencies
    contents = fc.read()
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 2278: character maps to <undefined>
copying: LapStats.py
copying: InSortedIntervalList.py
copying: minimal_intervals.py
copying: rsonlite.py
copying: Checklist.py
copying: GpxParse.py
copying: SetRangeMerge.py
copying: GeoAnimation.py
copying: Animation.py
copying: GanttChart.py
copying: Excel.py
copying: arial10.py
copying: GetResults.py
Compiling code...

Substituting '\U0001F3C1' and '\U0001F514' for '🏁' and '🔔' respectively in the source fixes the build problem. (Alternatively, I suppose UpdateDependencies() could be changed to handle this.)

esitarski commented 5 months ago

Grrr - Windows does not default to utf-8. The better fix is to add encoding='utf-8' to UpdateDependencies.py as Python can handle utf-8 encoding in source code. The fix should be available in the next hour or so (whenever github decides to build).

On Thu, Feb 29, 2024 at 3:25 PM Kim Wall @.***> wrote:

The current Windows build of SeriesMgr dies on startup as it does not have the module BatchPublishAttrs. This appears to be because during the Windows build UpdateDependencies() chokes on the non-ASCII characters in GetResults.py and does not copy the subsequent modules in Dependencies.py.

You can see the error at https://github.com/esitarski/CrossMgr/actions/runs/8054377156/job/21999052611 line 2269:

Fixing dependencies for SeriesMgr Traceback (most recent call last): File "D:\a\CrossMgr\CrossMgr\SeriesMgr\UpdateDependencies.py", line 26, in copying: Model.py UpdateDependencies() File "D:\a\CrossMgr\CrossMgr\SeriesMgr\UpdateDependencies.py", line 19, in UpdateDependencies contents = fc.read() File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 2278: character maps to copying: LapStats.py copying: InSortedIntervalList.py copying: minimal_intervals.py copying: rsonlite.py copying: Checklist.py copying: GpxParse.py copying: SetRangeMerge.py copying: GeoAnimation.py copying: Animation.py copying: GanttChart.py copying: Excel.py copying: arial10.py copying: GetResults.py Compiling code...

Substituting '\U0001F3C1' and '\U0001F514' for '🏁' and '🔔' respectively in the source fixes the build problem. (Alternatively, I suppose UpdateDependencies() could be changed to handle this.)

— Reply to this email directly, view it on GitHub https://github.com/esitarski/CrossMgr/issues/132, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABGXKKSIP24QZVV4UMJ7DDYV6HC3AVCNFSM6AAAAABEATD3BWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE3DEMBUGM4DSMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

--

Edward Sitarski

kimble4 commented 5 months ago

Yeah, that fixes it. Yet another reason that Windows isn't yet ready for the desktop...