Creating locally hosted server

76 views
Skip to first unread message

Owen Alfaro

unread,
Jul 16, 2021, 3:59:58 PM7/16/21
to astrometry
Hello,

I am trying to create a locally hosted server, on macOS 11.2, and Im following both of the docker file instructions. When following the ones available in astrometry/docker/webservice, it says to run 
      python manage.py makemigrations

I keep getting an error module not found: astrometry.util.util, and Im not sure where to find it. The closest file in astrometry/util is called util.i. Is that is what is supposed to be imported?

Any help would be appreciated, thank you
--Owen

  File "manage.py", line 19, in <module>

    execute_from_command_line(sys.argv)

  File "/Users/owenalfaro/Desktop/nova_server/server_/lib/python3.7/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line

    utility.execute()

  File "/Users/owenalfaro/Desktop/nova_server/server_/lib/python3.7/site-packages/django/core/management/__init__.py", line 395, in execute

    django.setup()

  File "/Users/owenalfaro/Desktop/nova_server/server_/lib/python3.7/site-packages/django/__init__.py", line 24, in setup

    apps.populate(settings.INSTALLED_APPS)

  File "/Users/owenalfaro/Desktop/nova_server/server_/lib/python3.7/site-packages/django/apps/registry.py", line 114, in populate

    app_config.import_models()

  File "/Users/owenalfaro/Desktop/nova_server/server_/lib/python3.7/site-packages/django/apps/config.py", line 301, in import_models

    self.models_module = import_module(models_module_name)

  File "/opt/anaconda3/lib/python3.7/importlib/__init__.py", line 127, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)

  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import

  File "<frozen importlib._bootstrap>", line 983, in _find_and_load

  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked

  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked

  File "<frozen importlib._bootstrap_external>", line 728, in exec_module

  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed

  File "/Users/owenalfaro/Desktop/nova_server/server_/lib/python3.7/site-packages/astrometry/net/models.py", line 23, in <module>

    from astrometry.net.enhance_models import *

  File "/Users/owenalfaro/Desktop/nova_server/server_/lib/python3.7/site-packages/astrometry/net/enhance_models.py", line 13, in <module>

    from astrometry.util.util import *

ModuleNotFoundError: No module named 'astrometry.util.util' 

Dustin Lang

unread,
Jul 22, 2021, 9:41:47 AM7/22/21
to astrometry
Hi,
Are you trying to follow the docker instructions to build, but not actually using the docker image??

astrometry.util.util is produced by the "make py" step; if you do "make install" after a successful "make py", the astrometry.util.util module will be installed with the rest of the code.  You then need to set PYTHONPATH to include that directory (by default, something like   export PYTHONPATH=${PYTHONPATH}:/usr/local/astrometry/lib/python )

cheers,
--dustin
Reply all
Reply to author
Forward
0 new messages