posit-dev / posit-dev/rsconnect-python

ValueError: The "" URL scheme is not supported.

Đang mở
#699 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Python
Star
37
Fork
28
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
7

Mô tả

I get penguins.qmd from https://quarto.org/docs/dashboards/interactivity/shiny-python/index.html

I create a venv with the requirements:

uv venv -p 3.13.5
uv pip install shiny shinywidgets jupyter seaborn
source .venv/bin/activate

I can now see the app I expect in Firefox after using quarto preview penguins.qmd in bash.

I'd like to deploy it to Connect from the CLI. Because it has interactive content, I need to use rsconnect deploy rather than quarto deploy.

~/src/quarto-python-shiny via 🐍 v3.13.5 (quarto-python-shiny) via ⨁ v1.7.32 
[ 15:55:19 ] ❯ rsconnect deploy quarto penguins.qmd 
Inspecting Quarto project...                     [OK]
Inspecting Python environment...                     Warning: Python version constraint missing from pyproject.toml, setup.cfg or .python-version
             Connect will guess the version to use based on local environment.
             Consider specifying a Python version constraint.
[OK]
Traceback (most recent call last):
  File "/home/lsimpson/src/quarto-python-shiny/.venv/lib/python3.13/site-packages/rsconnect/main.py", line 118, in wrapper
    result = func(*args, **kwargs)
  File "/home/lsimpson/src/quarto-python-shiny/.venv/lib/python3.13/site-packages/click/decorators.py", line 34, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/lsimpson/src/quarto-python-shiny/.venv/lib/python3.13/site-packages/rsconnect/main.py", line 1315, in deploy_quarto
    ce = RSConnectExecutor(
        ctx=ctx,
    ...<12 lines>...
        env_vars=env_vars,
    )
  File "/home/lsimpson/src/quarto-python-shiny/.venv/lib/python3.13/site-packages/rsconnect/api.py", line 771, in __init__
    self.setup_client(cookies)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/home/lsimpson/src/quarto-python-shiny/.venv/lib/python3.13/site-packages/rsconnect/api.py", line 927, in setup_client
    self.client = RSConnectClient(self.remote_server, cookies)
                  ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lsimpson/src/quarto-python-shiny/.venv/lib/python3.13/site-packages/rsconnect/api.py", line 382, in __init__
    super().__init__(
    ~~~~~~~~~~~~~~~~^
        append_to_path(server.url, "__api__"),
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<2 lines>...
        cookies,
        ^^^^^^^^
    )
    ^
  File "/home/lsimpson/src/quarto-python-shiny/.venv/lib/python3.13/site-packages/rsconnect/http_support.py", line 238, in __init__
    raise ValueError('The "%s" URL scheme is not supported.' % self._url.scheme)
ValueError: The "" URL scheme is not supported.
Internal error: The "" URL scheme is not supported.

From the log output, it isn't clear if I have done something wrong, or if this is an issue with rsconnect.

Note that I get the same error when I run sconnect deploy shiny . --entrypoint app.py

~/src/quarto-python-shiny via 🐍 v3.13.5 (quarto-python-shiny) via ⨁ v1.7.32 
[ 16:14:50 ] ❯ rsconnect deploy shiny . --entrypoint app.py
    Warning: Python version constraint missing from pyproject.toml, setup.cfg or .python-version
             Connect will guess the version to use based on local environment.
             Consider specifying a Python version constraint.
Traceback (most recent call last):
  File "/home/lsimpson/src/quarto-python-shiny/.venv/lib/python3.13/site-packages/rsconnect/main.py", line 118, in wrapper
    result = func(*args, **kwargs)
  File "/home/lsimpson/src/quarto-python-shiny/.venv/lib/python3.13/site-packages/click/decorators.py", line 34, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/lsimpson/src/quarto-python-shiny/.venv/lib/python3.13/site-packages/rsconnect/main.py", line 1674, in deploy_app
    ce = RSConnectExecutor(
        ctx=ctx,
    ...<16 lines>...
        env_vars=env_vars,
    )
  File "/home/lsimpson/src/quarto-python-shiny/.venv/lib/python3.13/site-packages/rsconnect/api.py", line 771, in __init__
    self.setup_client(cookies)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/home/lsimpson/src/quarto-python-shiny/.venv/lib/python3.13/site-packages/rsconnect/api.py", line 927, in setup_client
    self.client = RSConnectClient(self.remote_server, cookies)
                  ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lsimpson/src/quarto-python-shiny/.venv/lib/python3.13/site-packages/rsconnect/api.py", line 382, in __init__
    super().__init__(
    ~~~~~~~~~~~~~~~~^
        append_to_path(server.url, "__api__"),
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<2 lines>...
        cookies,
        ^^^^^^^^
    )
    ^
  File "/home/lsimpson/src/quarto-python-shiny/.venv/lib/python3.13/site-packages/rsconnect/http_support.py", line 238, in __init__
    raise ValueError('The "%s" URL scheme is not supported.' % self._url.scheme)
ValueError: The "" URL scheme is not supported.
Internal error: The "" URL scheme is not supported.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Tái hiện lỗi bằng các lệnh được hiển thị rsconnect deploy quartorsconnect deploy shiny. Bắt đầu trong rsconnect/api.py tại RSConnectExecutor.setup_clientRSConnectClient, sau đó kiểm tra rsconnect/http_support.py, nơi scheme của URL bị từ chối. Công việc được xem là hoàn tất khi bao gồm một bản sửa đã được xác minh hoặc chẩn đoán rõ ràng hơn cho URL máy chủ trống.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
cli
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.