Skip to content

Cache build error #160

@evcastelani

Description

@evcastelani

When I rebuilt the cache, this error occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/dmenu_extended/main.py", line 775, in cache_save
    f.write(item + "\n")
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcf3' in position 58: surrogates not allowed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/dmenu_extended_cache_build", line 8, in <module>
    sys.exit(build_cache())
  File "/usr/local/lib/python3.10/dist-packages/dmenu_extended/main.py", line 2270, in build_cache
    d.build_cache()
  File "/usr/local/lib/python3.10/dist-packages/dmenu_extended/main.py", line 1237, in build_cache
    self.cache_save(filenames, file_cache_files)
  File "/usr/local/lib/python3.10/dist-packages/dmenu_extended/main.py", line 805, in cache_save
    f.write(item + "\n")
TypeError: a bytes-like object is required, not 'str'

I've seen that bugs of this type have been fixed over time, but I don't know how to fix this one. Any suggestion? I've been using version 1.2.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions