|
4 | 4 |
|
5 | 5 | ## 1.5.26
|
6 | 6 |
|
7 |
| - |
8 | 7 | ### Bugs Squashed
|
9 | 8 |
|
10 |
| -- UnicodeDecodeError occurs when reading `settings.ini` file containing CJK characters on Windows, due to missing encoding parameter ([#483](https://github.com/fastai/fastcore/issues/483)) |
11 |
| - - When I tried to preview/test/prepare an nbdev project with `settings.ini` (UTF-8 encorded) which containing some CKJ (or maybe other non-ascii) characters, an error such as `UnicodeDecodeError: 'cp932' codec can't decode byte 0x82 in position 725: illegal multibyte sequence` ocurred. |
12 |
| - |
13 |
| -<details><summary>Example of settings and full error message</summary> |
14 |
| - |
15 |
| -When a setting file containing a line like |
16 |
| -``` |
17 |
| -description = サンプル プロジェクト (sample project) |
18 |
| -``` |
19 |
| - |
20 |
| -and nbdev_* command executed, output is like below: |
21 |
| -``` |
22 |
| -$ nbdev_preview.exe |
23 |
| -Traceback (most recent call last): |
24 |
| - File "C:\Users\<user_home>\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main |
25 |
| - return _run_code(code, main_globals, None, |
26 |
| - File "C:\Users\<user_home>\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code |
27 |
| - exec(code, run_globals) |
28 |
| - File "<path_to_venv>\Scripts\nbdev_preview.exe\__main__.py", line 7, in <module> |
29 |
| - File "<path_to_venv>\lib\site-packages\fastcore\script.py", line 119, in _f |
30 |
| - return tfunc(**merge(args, args_from_prog(func, xtra))) |
31 |
| - File "<path_to_venv>\lib\site-packages\nbdev\quarto.py", line 278, in preview |
32 |
| - nbdev_quarto.__wrapped__(path, preview=True, **kwargs) |
33 |
| - File "<path_to_venv>\lib\site-packages\nbdev\quarto.py", line 256, in nbdev_quarto |
34 |
| - nbdev.doclinks._build_modidx(skip_exists=True) |
35 |
| - File "<path_to_venv>\lib\site-packages\nbdev\doclinks.py", line 74, in _build_modidx |
36 |
| - if dest is None: dest = get_config().lib_path |
37 |
| - File "<path_to_venv>\lib\site-packages\nbdev\config.py", line 199, in get_config |
38 |
| - cfg = Config(cfg_file.parent, cfg_file.name, extra_files=extra_files, types=_types) |
39 |
| - File "<path_to_venv>\lib\site-packages\fastcore\foundation.py", line 258, in __init__ |
40 |
| - found = [Path(o) for o in self._cfg.read(L(extra_files)+[self.config_file])]#, encoding='utf-8')] |
41 |
| - File "C:\Users\<user_home>\AppData\Local\Programs\Python\Python310\lib\configparser.py", line 698, in read |
42 |
| - self._read(fp, filename) |
43 |
| - File "C:\Users\<user_home>\AppData\Local\Programs\Python\Python310\lib\configparser.py", line 1021, in _read |
44 |
| - for lineno, line in enumerate(fp, start=1): |
45 |
| -UnicodeDecodeError: 'cp932' codec can't decode byte 0x82 in position 725: illegal multibyte sequence |
46 |
| -``` |
47 |
| - |
48 |
| -Version info: |
49 |
| -Operating system: Windows 11 Pro (Japanese) |
50 |
| -Python 3.10.6 |
51 |
| -nbdev 2.1.7 |
52 |
| - |
53 |
| -</details> |
54 |
| - |
55 |
| -This error is likely caused due to no encoding being specified here: |
56 |
| -https://github.com/fastai/fastcore/blob/894bf94a3fcab91c85f05bc9a974a747533e9040/fastcore/foundation.py#L258 |
57 |
| - |
58 |
| -The error seems to be resolved by adding `encoding='utf-8'` to the argument of the ConfigParser.read() method. |
| 9 | +- Delegatee docments not appearing ([#485](https://github.com/fastai/fastcore/issues/485)) |
| 10 | +- UnicodeDecodeError occurs when reading `settings.ini` file containing CJK characters on Windows ([#483](https://github.com/fastai/fastcore/issues/483)) |
59 | 11 |
|
60 | 12 |
|
61 | 13 | ## 1.5.25
|
|
0 commit comments