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

'Server' object has no attribute 'default_filename' #233

Open
mamueHH opened this issue Sep 15, 2020 · 3 comments
Open

'Server' object has no attribute 'default_filename' #233

mamueHH opened this issue Sep 15, 2020 · 3 comments
Labels
state: needs info More information is needed to identify what has to be done for this issue/PR type: bug A confirmed bug or unintended behavior

Comments

@mamueHH
Copy link

mamueHH commented Sep 15, 2020

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'
@pradyunsg pradyunsg added the type: bug A confirmed bug or unintended behavior label Sep 18, 2020
@pradyunsg
Copy link
Collaborator

Could you share a minimal script to reproduce this issue?

@pradyunsg pradyunsg added the state: needs info More information is needed to identify what has to be done for this issue/PR label Sep 18, 2020
@ziotom78
Copy link

I have got the same error while trying to use markdownreveal 0.3.5 with Python 3.8.3, which seems to be the same case as @mamueFM. Steps to reproduce:

pip install markdownreveal==0.3.5
echo -e "# Test\n\nThis is a test" > test.md
markdownreveal test.md

I am not sure this is a problem with python-livereload; I believe that markdownreveal should call Server.serve instead of Server.application.

@Peque
Copy link
Contributor

Peque commented Jan 19, 2021

@ziotom78 I just updated Markdownreveal. Try to install the latest release (0.3.6) and see if it works for you.

The fix consisted on simply downgrading livereload to 2.6.2. If you want to contribute a fix to make it compatible with the latest livereload release, you are more than welcome: markdownreveal/markdownreveal#53 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: needs info More information is needed to identify what has to be done for this issue/PR type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

No branches or pull requests

4 participants