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

Autoreload raises AttributeError: 'NoneType' object has no attribute 'reload' #2570

Closed
MarcSkovMadsen opened this issue Jul 24, 2021 · 1 comment · Fixed by #2574
Closed
Labels
TRIAGE Default label for untriaged issues type: bug Something isn't correct or isn't working
Milestone

Comments

@MarcSkovMadsen
Copy link
Collaborator

After upgrading to Panel 0.12 when I panel serve script.py --autoreload --show I sometimes get the below when the app reloads. I've not yet been able to create a minimum reproducible example. It seems random so far.

2021-07-24 05:52:52,826 Exception in callback <bound method PeriodicCallback._periodic_callback of PeriodicCallback(callback=functools.partial(<function _reload_on_update at 0x000002057F80FC18>, {'scripts\script.py': 1627098714.0517485}), count=None, name='PeriodicCallback00099', period=500, running=False, timeout=None)>
Traceback (most recent call last):
File "c:\repos\private\awesome-panel.venv\lib\site-packages\tornado\ioloop.py", line 905, in _run
return self.callback()
File "c:\repos\private\awesome-panel.venv\lib\site-packages\panel\io\callbacks.py", line 70, in _periodic_callback
self.callback()
File "c:\repos\private\awesome-panel.venv\lib\site-packages\panel\io\reload.py", line 153, in _reload_on_update
_check_file(modify_times, path)
File "c:\repos\private\awesome-panel.venv\lib\site-packages\panel\io\reload.py", line 132, in _check_file
_reload(module)
File "c:\repos\private\awesome-panel.venv\lib\site-packages\panel\io\reload.py", line 119, in _reload
state.location.reload = True
AttributeError: 'NoneType' object has no attribute 'reload'

@MarcSkovMadsen MarcSkovMadsen added TRIAGE Default label for untriaged issues type: bug Something isn't correct or isn't working labels Jul 24, 2021
@MarcSkovMadsen MarcSkovMadsen added this to the v0.12.1 milestone Jul 24, 2021
@philippjfr
Copy link
Member

Will just add an explicit guard against this condition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TRIAGE Default label for untriaged issues type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants