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

kadi find_attitude crashes django dev server without --noreload flag #151

Open
taldcroft opened this issue Jan 2, 2020 · 1 comment
Open

Comments

@taldcroft
Copy link
Member

With the py3-server branch, when trying to solve for attitude with find_attitude using the django runserver, one gets a hard crash that is not caught by django debug (see below). I don't know what is going on except that it does not happen with python manage.py runserver --noreload. This may be related to some threading (or non-threadsafe code), because even with --noreload one gets this warning: WARNING: signal only works in main thread. Using --nothreading makes that go away.

We'll see if this affects operation on the Apache/mod_wsgi server.

WARNING: imaging routines will not be available, 
failed to import sherpa.image.ds9_backend due to 
'RuntimeErr: DS9Win unusable: Could not find ds9 on your PATH'
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_from_command_line(sys.argv)
  File "/export/tom/miniconda3/envs/ska3-django3/lib/python3.6/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/export/tom/miniconda3/envs/ska3-django3/lib/python3.6/site-packages/django/core/management/__init__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/export/tom/miniconda3/envs/ska3-django3/lib/python3.6/site-packages/django/core/management/base.py", line 328, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/export/tom/miniconda3/envs/ska3-django3/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 60, in execute
    super().execute(*args, **options)
  File "/export/tom/miniconda3/envs/ska3-django3/lib/python3.6/site-packages/django/core/management/base.py", line 369, in execute
    output = self.handle(*args, **options)
  File "/export/tom/miniconda3/envs/ska3-django3/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 95, in handle
    self.run(**options)
  File "/export/tom/miniconda3/envs/ska3-django3/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 102, in run
    autoreload.run_with_reloader(self.inner_run, **options)
  File "/export/tom/miniconda3/envs/ska3-django3/lib/python3.6/site-packages/django/utils/autoreload.py", line 599, in run_with_reloader
    start_django(reloader, main_func, *args, **kwargs)
  File "/export/tom/miniconda3/envs/ska3-django3/lib/python3.6/site-packages/django/utils/autoreload.py", line 584, in start_django
    reloader.run(django_main_thread)
  File "/export/tom/miniconda3/envs/ska3-django3/lib/python3.6/site-packages/django/utils/autoreload.py", line 299, in run
    self.run_loop()
  File "/export/tom/miniconda3/envs/ska3-django3/lib/python3.6/site-packages/django/utils/autoreload.py", line 305, in run_loop
    next(ticker)
  File "/export/tom/miniconda3/envs/ska3-django3/lib/python3.6/site-packages/django/utils/autoreload.py", line 345, in tick
    for filepath, mtime in self.snapshot_files():
  File "/export/tom/miniconda3/envs/ska3-django3/lib/python3.6/site-packages/django/utils/autoreload.py", line 361, in snapshot_files
    for file in self.watched_files():
  File "/export/tom/miniconda3/envs/ska3-django3/lib/python3.6/site-packages/django/utils/autoreload.py", line 260, in watched_files
    yield from iter_all_python_module_files()
  File "/export/tom/miniconda3/envs/ska3-django3/lib/python3.6/site-packages/django/utils/autoreload.py", line 105, in iter_all_python_module_files
    return iter_modules_and_files(modules, frozenset(_error_files))
  File "/export/tom/miniconda3/envs/ska3-django3/lib/python3.6/site-packages/django/utils/autoreload.py", line 118, in iter_modules_and_files
    if module.__name__ == '__main__':
  File "/export/tom/miniconda3/envs/ska3-django3/lib/python3.6/site-packages/py/_apipkg.py", line 171, in __getattribute__
    return getattr(getmod(), name)
  File "/export/tom/miniconda3/envs/ska3-django3/lib/python3.6/site-packages/py/_error.py", line 44, in __getattr__
    raise AttributeError(name)
AttributeError: __name__
@taldcroft taldcroft changed the title kadi find_attitude crashes dev server without --noreload flag kadi find_attitude crashes django dev server without --noreload flag Jan 2, 2020
@taldcroft
Copy link
Member Author

Also worth noting that this occurs only on linux (CentOS-7) and not on MacOSX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant