Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

'Server' object has no attribute 'default_filename'

Đang mở
#233 3 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ó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
50/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
backend

Hướng nghiên cứu

Start in livereload/server.py at Server.init and get_web_handlers, the locations shown by the traceback. Check how default_filename is used and ensure the Server instance initializes it before get_web_handlers runs. Done means the reported AttributeError no longer occurs when application() is called.

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

Mô tả

state: needs info type: bug

livereload 2.6.3
Got an exception 'Server' object has no attribute 'default_filename', full stack trace below
Cause: missing initialization of self.default_filename in Server's __init__

Traceback (most recent call last):
  File "./markdownreveal", line 8, in <module>
    sys.exit(cli())
  File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/mam/.local/lib/python3.8/site-packages/markdownreveal/commands.py", line 80, in show
    server.application(port, host, liveport=None, debug=True, live_css=True)
  File "/home/mam/.local/lib/python3.8/site-packages/livereload/server.py", line 279, in application
    web_handlers = self.get_web_handlers(live_script)
  File "/home/mam/.local/lib/python3.8/site-packages/livereload/server.py", line 309, in get_web_handlers
    'default_filename': self.default_filename,
AttributeError: 'Server' object has no attribute 'default_filename'
Ngôn ngữ chính
Python
Star
1.1k
Fork
148
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 lepture/python-livereload

Tất cả issue của lepture/python-livereload

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.