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

TabbyML Code Browser GitHub repo with special characters in folder name #2081

Closed
Wolfsauge opened this issue May 9, 2024 · 4 comments · Fixed by #2127
Closed

TabbyML Code Browser GitHub repo with special characters in folder name #2081

Wolfsauge opened this issue May 9, 2024 · 4 comments · Fixed by #2127
Assignees
Labels
bug Something isn't working

Comments

@Wolfsauge
Copy link

Wolfsauge commented May 9, 2024

Describe the bug
When adding the repo https://github.com/ArjanCodes/betterpython, waiting for the scheduler to add the repo, I will see the folder structure in the code browser's left pane. However, the right pane remains empty on any Python files I'm trying to browse. While repos without folders with & in their names seem to work fine.

Please note the presence of the folder https://github.com/ArjanCodes/betterpython/tree/main/6%20-%20template%20method%20%26%20bridge in the repo.

When inspecting the tabbyml docker container logs, I find the following error message:

$ podman logs -tf tabbyml
...
2024-05-09T14:01:03.519535000+02:00 2024-05-09T12:01:03.519448Z  WARN HTTP request{otel.name=GET /repositories/:name/resolve/*path http.client_ip=192.168.0.1:42606 http.flavor=1.1 http.host=mnemosyne.local:8080 http.method=GET http.route=/repositories/:name/resolve/*path http.scheme=HTTP http.target=/repositories/arjancodesbetterpython/resolve/6%20-%20template%20method%20&%20bridge/with-bridge.py http.user_agent=Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0 otel.kind=server trace_id=7b91622919764b4ddaedf464f2b34582}:resolve_path{repo=ResolveParams { name: "arjancodesbetterpython", path: Some("6 - template method & bridge/with-bridge.py") }}: tabby_webserver::repositories: ee/tabby-webserver/src/repositories/mod.rs:70: failed to resolve_file <"/data/repositories/arjancodesbetterpython/6 - template method & bridge/with-bridge.py">: invalid uri character
...

Same line, word wrapped:

2024-05-09T14:01:03.519535000+02:00 2024-05-09T12:01:03.519448Z  WARN HTTP
request
{otel.name=GET /repositories/:name/resolve/*path
http.client_ip=192.168.0.1:42606 http.flavor=1.1
http.host=mnemosyne.local:8080 http.method=GET
http.route=/repositories/:name/resolve/*path http.scheme=HTTP
http.target=/repositories/arjancodesbetterpython/resolve/6%20-%20template%20method%20&%20bridge/with-bridge.py
http.user_agent=Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101
Firefox/125.0 otel.kind=server
trace_id=7b91622919764b4ddaedf464f2b34582}:resolve_path{repo=ResolveParams
{ name: "arjancodesbetterpython", path: Some("6 - template method &
bridge/with-bridge.py") }}: tabby_webserver::repositories:
ee/tabby-webserver/src/repositories/mod.rs:70: failed to resolve_file
<"/data/repositories/arjancodesbetterpython/6 - template method &
bridge/with-bridge.py">: invalid uri character

The expected behavior would be to be able to browse the files.

Information about your version
Please provide output of tabby --version

Entering the container yields this output:

root@d77059856d61:/# tabby --version
tabby 0.10.0

I retried with tabbyml latest official image:

$ podman ps
CONTAINER ID  IMAGE                           COMMAND               CREATED         STATUS         PORTS                   NAMES
d77059856d61  docker.io/tabbyml/tabby:latest  serve --device cu...  44 minutes ago  Up 44 minutes  0.0.0.0:8080->8080/tcp  tabbyml

$ podman image list tabby
REPOSITORY               TAG         IMAGE ID      CREATED      SIZE
docker.io/tabbyml/tabby  latest      ca9238815b16  2 weeks ago  2.29 GB

Information about your GPU
Please provide output of nvidia-smi

$ nvidia-smi
Thu May  9 14:58:24 2024       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.78                 Driver Version: 550.78         CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 3090        Off |   00000000:01:00.0 Off |                  N/A |
|  0%   39C    P8             35W /  420W |   16642MiB /  24576MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A       818      G   /usr/lib/Xorg                                   4MiB |
|    0   N/A  N/A     63028      C   /opt/tabby/bin/tabby                        16628MiB |
+-----------------------------------------------------------------------------------------+

Additional context
Add any other context about the problem here.

I've noticed the many rc versions of 0.11.0 in the docker.io/tabbyml repo.

As I currently believe this is a bug in tabbyml, I probably should retry the actual latest rc versions of 0.11.0 to validate the behavior of the latest versions.

@Wolfsauge
Copy link
Author

Wolfsauge commented May 9, 2024

Okay, so I've just tried the currently available tabbyml nightly build docker image and can confirm the error to be still present in that.

How to reproduce:

  • add repo with & in folder name (example link in first comment) to repository providers in tabbyml settings
  • try to open a *.py file in the code browser, after it has been indexed
  • notice the right pane remains empty, where the code would normally appear

Container log line:

2024-05-09T15:08:42.658376000+02:00 2024-05-09T13:08:42.657888Z  WARN resolve_path{repo=ResolveParams { kind: Git, id: ID("V1xYGx"), path: Some("6 - template method & bridge/trading-before.py") }}: tabby_webserver::routes::repositories: ee/tabby-webserver/src/routes/repositories/mod.rs:65: failed to resolve_file <"/data/repositories/https_github.com_ArjanCodes_betterpython/6 - template method & bridge/trading-before.py">: invalid uri character

The same log line word wrapped for legibility:

2024-05-09T15:08:42.658376000+02:00 2024-05-09T13:08:42.657888Z  WARN
resolve_path{repo=ResolveParams { kind: Git, id: ID("V1xYGx"), path: Some
("6 - template method & bridge/trading-before.py") }}:
tabby_webserver::routes::repositories:
ee/tabby-webserver/src/routes/repositories/mod.rs:65: failed to resolve_file
<"/data/repositories/https_github.com_ArjanCodes_betterpython/6 - template
method & bridge/trading-before.py">: invalid uri character
$ podman image list tabby
REPOSITORY               TAG         IMAGE ID      CREATED       SIZE
docker.io/tabbyml/tabby  nightly     ce51a71aaafa  17 hours ago  2.32 GB
docker.io/tabbyml/tabby  latest      ca9238815b16  2 weeks ago   2.29 GB

If you have any suggestions, please don't hesitate to comment.

@wsxiaoys
Copy link
Member

wsxiaoys commented May 9, 2024

Thanks for the bug fix and this happens to be fixed yesterday in #2079

It shall be released as part of 0.11

@wsxiaoys wsxiaoys added bug Something isn't working fixed-in-next-release and removed bug-unconfirmed labels May 9, 2024
@joaodinissf
Copy link
Contributor

joaodinissf commented May 14, 2024

@wsxiaoys I'm afraid the fix has not been completely successful: I am currently seeing exactly the same behavior as described by @Wolfsauge when attempting to open a file with a # in its name. (Specifically, I'm seeing this behavior described in the top comment of this thread: "the right pane remains empty on any files I'm trying to browse.")

Renaming the file so that it doesn't contain a # serves as a workaround.

I am currently running version 0.11.0.

@wsxiaoys
Copy link
Member

released in https://github.com/TabbyML/tabby/releases/tag/v0.11.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants