posit-dev / posit-dev/rsconnect-python

ValueError: The "" URL scheme is not supported.

Aperta
#699 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Python
Stelle
37
Fork
28
Merge medio
1g 3h
PR unite (30g)
7

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riproduci il malfunzionamento con i comandi mostrati rsconnect deploy quarto e rsconnect deploy shiny. Inizia da rsconnect/api.py, in RSConnectExecutor.setup_client e RSConnectClient, quindi esamina rsconnect/http_support.py, dove lo schema URL viene rifiutato. Il lavoro sarà completo quando includerà una correzione verificata o una diagnosi più chiara per l’URL del server vuoto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
cli
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.