Project

General

Profile

Actions

Bug #11385

closed

Cannot close CHIRP next-20240614 Python 3.10.8 wx 4.2.0 msw 3.2.0, and cannot open saved .img .csv

Added by Michael Skřepský 6 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
06/16/2024
Due date:
% Done:

100%

Estimated time:
Chirp Version:
next
Model affected:
Quansheng UV-K5 Egzumer 0.19
Platform:
Windows
I read the instructions above:
Yes

Description

Hi, for CHIRP next-20240614 Python 3.10.8 wx 4.2.0 msw 3.2.0 on windows 10 pro (czech locale), Quansheng UV-K5 Egzumer 0.19 (does not matter for bug 1):

1) Cannot close the program with "Close" and "X" buttons, must kill it in process explorer

2) cannot open saved .img or .csv, it does nothing
but i can download from radio, modify and upload back. I would like to be able upload to new radio from save for example, now i need to download, and upload to radio because i cannot open save file no matter what.


Files

chirp.config (336 Bytes) chirp.config Michael Skřepský, 06/17/2024 12:35 AM
error chirp.jpg (11.5 KB) error chirp.jpg Michael Skřepský, 06/17/2024 12:40 AM
chirp_debug-k87buokk.txt (2.23 KB) chirp_debug-k87buokk.txt Michael Skřepský, 06/17/2024 01:52 PM
Actions #1

Updated by Dan Smith 6 months ago

Can you capture your chirp.config file and attach it here? Go to %APPDATA%\CHIRP in the filesystem and grab the chirp.config file.

Updated by Michael Skřepský 6 months ago

Here it is.
i also tried to open some default config .csv (shows in that config file), shows error (pic included)
then tried my downloaded and saved .img and .csv again, does not load and does not show errors

Actions #3

Updated by Alexandre J. Raymond 6 months ago

Hi Michael, would you happen to use folders with CHIRP that include the following character in their name: ů ?

Actions #4

Updated by Alexandre J. Raymond 6 months ago

Dan Smith, looks like the config file is opened without a specific encoding in config.py, which would yield cp1252 on Windows.

    def save(self):
        cfg = os.path.join(self.__basepath, self.__name)
        with open(cfg, "w") as cfg_file:
            self.__config.write(cfg_file)

I am able to reproduce similar issues a few different ways:
1) use a RadioReference.com username containing ů
2) opening a csv file in a folder named ů

CP1252 seems unable to represent ů.

>>> '\u016f'.encode('cp1252')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "c:\Python310\lib\encodings\cp1252.py", line 12, in encode
    return codecs.charmap_encode(input,errors,encoding_table)
UnicodeEncodeError: 'charmap' codec can't encode character '\u016f' in position 0: character maps to <undefined>
Actions #5

Updated by Michael Skřepský 6 months ago

Hi Alexandre,
opened from different folder, works ok and even can be closed normally.
I will watch unusual folder names and move files if needed.
Thank you for solving this mystery!

Actions #6

Updated by Dan Smith 6 months ago

looks like the config file is opened without a specific encoding in config.py, which would yield cp1252 on Windows.

Yep, that's why I wanted to see the config so I could try locally, but of course it was failing to write so it never ended up in the file. That config reading and writing predates python3 of course. I'll queue a fix.

Actions #7

Updated by Dan Smith 6 months ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF