Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot view/ open files #112

Closed
Andonome opened this issue Sep 26, 2023 · 2 comments
Closed

Cannot view/ open files #112

Andonome opened this issue Sep 26, 2023 · 2 comments

Comments

@Andonome
Copy link

Expected Behavior

kb view 0 should open the file.

Actual Behavior

Traceback (most recent call last):
  File "/usr/bin/kb", line 33, in <module>
    sys.exit(load_entry_point('kb-manager==0.1.7', 'console_scripts', 'kb')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/kb/main.py", line 66, in main
    dispatch(cmd, cmd_params, config=DEFAULT_CONFIG)
  File "/usr/lib/python3.11/site-packages/kb/main.py", line 56, in dispatch
    return COMMANDS[function](*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/kb/commands/view.py", line 68, in view
    view_by_id(args["nameid"], config, args["editor"], color_mode)
  File "/usr/lib/python3.11/site-packages/kb/commands/view.py", line 125, in view_by_id
    viewer.view(artifact_path, markers, color=color_mode)
  File "/usr/lib/python3.11/site-packages/kb/viewer.py", line 107, in view
    content = fname.read()
              ^^^^^^^^^^^^
  File "<frozen codecs>", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

Steps to Reproduce the Problem

  1. No idea.
  2. Something to do with Arch, probably.
  3. It happens with pdf and jpg files, and probably everything else.

Specifications

  • Version: kb 0.1.7
  • Platform: Arch Linux
  • Subsystem: ???
@gnebbia
Copy link
Owner

gnebbia commented Mar 10, 2024

Can you be more specific? I am not able to reproduce the issue.
Can you try cloning the project and try to run it with deps installed from a virtual environment?

Or what type of file is your file 0? That could give us hints about the source of the issue

@Andonome
Copy link
Author

I'm afraid I've deleted the database and cannot replicate the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants