stack trace when you have multiple saved servers and don't pick one

Đang mở
#541 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.

Đánh giá

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

Hướng nghiên cứu

Bắt đầu từ entry point deploy_quarto trong rsconnect/main.py và theo dõi RSConnectExecutor qua rsconnect/api.py đến phần chọn server và xử lý URL được thể hiện trong traceback. Tái hiện lệnh với nhiều server đã lưu và không có -n; hoàn tất khi lệnh báo lỗi chọn server hữu ích thay vì stack trace.

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

Mô tả

I have 3 saved/nicknamed servers. When deploying, I need to pick one using -n. When I forgot, instead of a helpful error message I got a stack trace:

❯ rsconnect deploy quarto index.qmd
Inspecting Quarto project...                     [OK]
Traceback (most recent call last):
  File "/Users/chris/content/quarto-email-install-fest/.venv/lib/python3.11/site-packages/rsconnect/main.py", line 97, in wrapper
    result = func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chris/content/quarto-email-install-fest/.venv/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chris/content/quarto-email-install-fest/.venv/lib/python3.11/site-packages/rsconnect/main.py", line 1219, in deploy_quarto
    ce = RSConnectExecutor(**kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chris/content/quarto-email-install-fest/.venv/lib/python3.11/site-packages/rsconnect/api.py", line 424, in __init__
    self.setup_client(cookies)
  File "/Users/chris/content/quarto-email-install-fest/.venv/lib/python3.11/site-packages/rsconnect/api.py", line 540, in setup_client
    self.client = RSConnectClient(self.remote_server, cookies)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chris/content/quarto-email-install-fest/.venv/lib/python3.11/site-packages/rsconnect/api.py", line 136, in __init__
    append_to_path(server.url, "__api__"),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chris/content/quarto-email-install-fest/.venv/lib/python3.11/site-packages/rsconnect/http_support.py", line 129, in append_to_path
    if uri.endswith("/") and path.startswith("/"):
       ^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'endswith'
Internal error: 'NoneType' object has no attribute 'endswith'

related: #214

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

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.

Issue khác của posit-dev/rsconnect-python

Tất cả issue của posit-dev/rsconnect-python

Issue tương tự

Thêm issue về Python

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.