sot / kadi

Chandra commands and events
https://sot.github.io/kadi
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

kadi failure on import - needs a secret key or super decoder ring... #63

Closed Gregg140 closed 8 years ago

Gregg140 commented 9 years ago

Had some code that used to work with kadi, now it can't even do the import. Commands and error messages below

acis-101: source /proj/sot/ska/bin/ska_envs.csh acis-102: ipython --pylab Python 2.7.1 (r271:86832, Feb 7 2011, 11:30:54) Type "copyright", "credits" or "license" for more information.

IPython 0.13.1 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details. Gtk-Message: Failed to load module "canberra-gtk-module": libcanberra-gtk-module.so: cannot open shared object file: No such file or directory Gtk-Message: Failed to load module "pk-gtk-module": libpk-gtk-module.so: cannot open shared object file: No such file or directory

Welcome to pylab, a matplotlib-based Python environment [backend: GTKAgg]. For more information, type 'help(pylab)'.

In [1]: from kadi import events

Creating secret key file /proj/sot/ska/data/kadi/secret_key.txt

IOError Traceback (most recent call last)

in () ----> 1 from kadi import events /proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/kadi/events/**init**.py in () 42 43 # from .models import * ---> 44 from .query import * /proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/kadi/events/query.py in () 6 from Chandra.Time import DateTime 7 ----> 8 from . import models 9 from .models import IntervalPad 10 /proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/kadi/events/models.py in () 7 os.environ['DJANGO_SETTINGS_MODULE'] = 'kadi.settings' 8 ----> 9 from django.db import models 10 models.query.REPR_OUTPUT_SIZE = 1000 # Increase default number of rows printed 11 /proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/**init**.py in () 3 from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured 4 from django.db.models.loading import get_apps, get_app_paths, get_app, get_models, get_model, register_models, UnavailableApp ----> 5 from django.db.models.query import Q 6 from django.db.models.expressions import F 7 from django.db.models.manager import Manager /proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/query.py in () 15 from django.db.models.query_utils import (Q, select_related_descend, 16 deferred_class_factory, InvalidQuery) ---> 17 from django.db.models.deletion import Collector 18 from django.db.models import sql 19 from django.utils.functional import partition /proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/deletion.py in () 2 3 from django.db import connections, transaction, IntegrityError ----> 4 from django.db.models import signals, sql 5 from django.utils.datastructures import SortedDict 6 from django.utils import six /proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/sql/**init**.py in () 2 3 from django.db.models.sql.datastructures import EmptyResultSet ----> 4 from django.db.models.sql.subqueries import * 5 from django.db.models.sql.query import * 6 from django.db.models.sql.where import AND, OR /proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/sql/subqueries.py in () 10 from django.db.models.sql.constants import * 11 from django.db.models.sql.datastructures import Date, DateTime ---> 12 from django.db.models.sql.query import Query 13 from django.db.models.sql.where import AND, Constraint 14 from django.utils.functional import Promise /proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/sql/query.py in () 20 from django.db.models.fields import FieldDoesNotExist 21 from django.db.models.related import PathInfo ---> 22 from django.db.models.sql import aggregates as base_aggregates_module 23 from django.db.models.sql.constants import (QUERY_TERMS, ORDER_DIR, SINGLE, 24 ORDER_PATTERN, JoinInfo, SelectInfo) /proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/sql/aggregates.py in () 7 8 # Fake fields used to identify aggregate types in data-conversion operations. ----> 9 ordinal_aggregate_field = IntegerField() 10 computed_aggregate_field = FloatField() 11 /proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/fields/**init**.pyc in **init**(self, verbose_name, name, primary_key, max_length, unique, blank, null, db_index, rel, default, editable, serialize, unique_for_date, unique_for_month, unique_for_year, choices, help_text, db_column, db_tablespace, auto_created, validators, error_messages) 114 self.help_text = help_text 115 self.db_column = db_column --> 116 self.db_tablespace = db_tablespace or settings.DEFAULT_INDEX_TABLESPACE 117 self.auto_created = auto_created 118 /proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/conf/**init**.pyc in **getattr**(self, name) 52 def **getattr**(self, name): 53 if self._wrapped is empty: ---> 54 self._setup(name) 55 return getattr(self._wrapped, name) 56 /proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/conf/**init**.pyc in _setup(self, name) 47 % (desc, ENVIRONMENT_VARIABLE)) 48 ---> 49 self._wrapped = Settings(settings_module) 50 self._configure_logging() 51 /proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/conf/**init**.pyc in **init**(self, settings_module) 126 127 try: --> 128 mod = importlib.import_module(self.SETTINGS_MODULE) 129 except ImportError as e: 130 raise ImportError( /proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/utils/importlib.pyc in import_module(name, package) 38 level += 1 39 name = _resolve_name(name[level:], package, level) ---> 40 __import__(name) 41 return sys.modules[name] /proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/kadi/settings.py in () 29 chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)' 30 SECRET_KEY = ''.join([random.SystemRandom().choice(chars) for i in range(50)]) ---> 31 with open(_secret_file, 'w') as fh: 32 fh.write(SECRET_KEY) 33 try: IOError: [Errno 13] Permission denied: '/proj/sot/ska/data/kadi/secret_key.txt' In [2]:
jeanconn commented 9 years ago

Hi Gregg,

I assume I'm getting this in the middle of a conversation, but can I have some back story? Why do you need to write a secret key into /proj/sot/ska?

Thanks, Jean

On Tue, Jan 20, 2015 at 1:44 PM, Gregg140 notifications@github.com wrote:

Had some code that used to work with kadi, now it can't even do the import. Commands and error messages below

acis-101: source /proj/sot/ska/bin/ska_envs.csh acis-102: ipython --pylab Python 2.7.1 (r271:86832, Feb 7 2011, 11:30:54) Type "copyright", "credits" or "license" for more information.

IPython 0.13.1 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details. Gtk-Message: Failed to load module "canberra-gtk-module": libcanberra-gtk-module.so: cannot open shared object file: No such file or directory Gtk-Message: Failed to load module "pk-gtk-module": libpk-gtk-module.so: cannot open shared object file: No such file or directory

Welcome to pylab, a matplotlib-based Python environment [backend: GTKAgg]. For more information, type 'help(pylab)'.

In [1]: from kadi import events Creating secret key file /proj/sot/ska/data/kadi/secret_key.txt

IOError Traceback (most recent call last) in () ----> 1 from kadi import events

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/kadi/events/ init.py in () 42 43 # from .models import ---> 44 from .query import

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/kadi/events/query.py in () 6 from Chandra.Time import DateTime 7 ----> 8 from . import models 9 from .models import IntervalPad 10

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/kadi/events/models.py in () 7 os.environ['DJANGO_SETTINGS_MODULE'] = 'kadi.settings' 8 ----> 9 from django.db import models 10 models.query.REPR_OUTPUT_SIZE = 1000 # Increase default number of rows printed 11

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/ init.py in () 3 from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured 4 from django.db.models.loading import get_apps, get_app_paths, get_app, get_models, get_model, register_models, UnavailableApp ----> 5 from django.db.models.query import Q 6 from django.db.models.expressions import F 7 from django.db.models.manager import Manager

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/query.py in () 15 from django.db.models.query_utils import (Q, select_related_descend, 16 deferred_class_factory, InvalidQuery) ---> 17 from django.db.models.deletion import Collector 18 from django.db.models import sql 19 from django.utils.functional import partition

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/deletion.py in () 2 3 from django.db import connections, transaction, IntegrityError ----> 4 from django.db.models import signals, sql 5 from django.utils.datastructures import SortedDict 6 from django.utils import six

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/sql/ init.py in () 2 3 from django.db.models.sql.datastructures import EmptyResultSet ----> 4 from django.db.models.sql.subqueries import 5 from django.db.models.sql.query import 6 from django.db.models.sql.where import AND, OR

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/sql/subqueries.py in () 10 from django.db.models.sql.constants import * 11 from django.db.models.sql.datastructures import Date, DateTime ---> 12 from django.db.models.sql.query import Query 13 from django.db.models.sql.where import AND, Constraint 14 from django.utils.functional import Promise

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/sql/query.py in () 20 from django.db.models.fields import FieldDoesNotExist 21 from django.db.models.related import PathInfo ---> 22 from django.db.models.sql import aggregates as base_aggregates_module 23 from django.db.models.sql.constants import (QUERY_TERMS, ORDER_DIR, SINGLE, 24 ORDER_PATTERN, JoinInfo, SelectInfo)

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/sql/aggregates.py in () 7 8 # Fake fields used to identify aggregate types in data-conversion operations. ----> 9 ordinal_aggregate_field = IntegerField() 10 computed_aggregate_field = FloatField() 11

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/fields/ init.pyc in init(self, verbose_name, name, primary_key, max_length, unique, blank, null, db_index, rel, default, editable, serialize, unique_for_date, unique_for_month, unique_for_year, choices, help_text, db_column, db_tablespace, auto_created, validators, error_messages) 114 self.help_text = help_text 115 self.db_column = db_column --> 116 self.db_tablespace = db_tablespace or settings.DEFAULT_INDEX_TABLESPACE 117 self.auto_created = auto_created 118

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/conf/ init.pyc in getattr(self, name) 52 def getattr(self, name): 53 if self._wrapped is empty: ---> 54 self._setup(name) 55 return getattr(self._wrapped, name) 56

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/conf/ init.pyc in _setup(self, name) 47 % (desc, ENVIRONMENT_VARIABLE)) 48 ---> 49 self._wrapped = Settings(settings_module) 50 self._configure_logging() 51

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/conf/ init.pyc in init(self, settings_module) 126 127 try: --> 128 mod = importlib.import_module(self.SETTINGS_MODULE) 129 except ImportError as e: 130 raise ImportError(

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/utils/importlib.pyc in import_module(name, package) 38 level += 1 39 name = _resolve_name(name[level:], package, level) ---> 40 import(name) 41 return sys.modules[name]

/proj/sot/ska/arch/x86_64-linuxCentOS-5/lib/python2.7/site-packages/kadi/settings.py in () 29 chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-=+)' 30 SECRET_KEY = ''.join([random.SystemRandom().choice(chars) for i in range(50)]) ---> 31 with open(_secret_file, 'w') as fh: 32 fh.write(SECRET_KEY) 33 try:

IOError: [Errno 13] Permission denied: '/proj/sot/ska/data/kadi/secret_key.txt'

In [2]:

— Reply to this email directly or view it on GitHub https://github.com/sot/kadi/issues/63.

jeanconn commented 9 years ago

Or wait, is your code just doing "from kadi import events"? I'm having trouble reading your traceback.

On Tue, Jan 20, 2015 at 1:53 PM, Jean Connelly < jeanconn@head.cfa.harvard.edu> wrote:

Hi Gregg,

I assume I'm getting this in the middle of a conversation, but can I have some back story? Why do you need to write a secret key into /proj/sot/ska?

Thanks, Jean

On Tue, Jan 20, 2015 at 1:44 PM, Gregg140 notifications@github.com wrote:

Had some code that used to work with kadi, now it can't even do the import. Commands and error messages below

acis-101: source /proj/sot/ska/bin/ska_envs.csh acis-102: ipython --pylab Python 2.7.1 (r271:86832, Feb 7 2011, 11:30:54) Type "copyright", "credits" or "license" for more information.

IPython 0.13.1 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details. Gtk-Message: Failed to load module "canberra-gtk-module": libcanberra-gtk-module.so: cannot open shared object file: No such file or directory Gtk-Message: Failed to load module "pk-gtk-module": libpk-gtk-module.so: cannot open shared object file: No such file or directory

Welcome to pylab, a matplotlib-based Python environment [backend: GTKAgg]. For more information, type 'help(pylab)'.

In [1]: from kadi import events Creating secret key file /proj/sot/ska/data/kadi/secret_key.txt

IOError Traceback (most recent call last) in () ----> 1 from kadi import events

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/kadi/events/ init.py in () 42 43 # from .models import ---> 44 from .query import

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/kadi/events/query.py in () 6 from Chandra.Time import DateTime 7 ----> 8 from . import models 9 from .models import IntervalPad 10

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/kadi/events/models.py in () 7 os.environ['DJANGO_SETTINGS_MODULE'] = 'kadi.settings' 8 ----> 9 from django.db import models 10 models.query.REPR_OUTPUT_SIZE = 1000 # Increase default number of rows printed 11

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/ init.py in () 3 from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured 4 from django.db.models.loading import get_apps, get_app_paths, get_app, get_models, get_model, register_models, UnavailableApp ----> 5 from django.db.models.query import Q 6 from django.db.models.expressions import F 7 from django.db.models.manager import Manager

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/query.py in () 15 from django.db.models.query_utils import (Q, select_related_descend, 16 deferred_class_factory, InvalidQuery) ---> 17 from django.db.models.deletion import Collector 18 from django.db.models import sql 19 from django.utils.functional import partition

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/deletion.py in () 2 3 from django.db import connections, transaction, IntegrityError ----> 4 from django.db.models import signals, sql 5 from django.utils.datastructures import SortedDict 6 from django.utils import six

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/sql/ init.py in () 2 3 from django.db.models.sql.datastructures import EmptyResultSet ----> 4 from django.db.models.sql.subqueries import 5 from django.db.models.sql.query import 6 from django.db.models.sql.where import AND, OR

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/sql/subqueries.py in () 10 from django.db.models.sql.constants import * 11 from django.db.models.sql.datastructures import Date, DateTime ---> 12 from django.db.models.sql.query import Query 13 from django.db.models.sql.where import AND, Constraint 14 from django.utils.functional import Promise

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/sql/query.py in () 20 from django.db.models.fields import FieldDoesNotExist 21 from django.db.models.related import PathInfo ---> 22 from django.db.models.sql import aggregates as base_aggregates_module 23 from django.db.models.sql.constants import (QUERY_TERMS, ORDER_DIR, SINGLE, 24 ORDER_PATTERN, JoinInfo, SelectInfo)

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/sql/aggregates.py in () 7 8 # Fake fields used to identify aggregate types in data-conversion operations. ----> 9 ordinal_aggregate_field = IntegerField() 10 computed_aggregate_field = FloatField() 11

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/fields/ init.pyc in init(self, verbose_name, name, primary_key, max_length, unique, blank, null, db_index, rel, default, editable, serialize, unique_for_date, unique_for_month, unique_for_year, choices, help_text, db_column, db_tablespace, auto_created, validators, error_messages) 114 self.help_text = help_text 115 self.db_column = db_column --> 116 self.db_tablespace = db_tablespace or settings.DEFAULT_INDEX_TABLESPACE 117 self.auto_created = auto_created 118

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/conf/ init.pyc in getattr(self, name) 52 def getattr(self, name): 53 if self._wrapped is empty: ---> 54 self._setup(name) 55 return getattr(self._wrapped, name) 56

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/conf/ init.pyc in _setup(self, name) 47 % (desc, ENVIRONMENT_VARIABLE)) 48 ---> 49 self._wrapped = Settings(settings_module) 50 self._configure_logging() 51

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/conf/ init.pyc in init(self, settings_module) 126 127 try: --> 128 mod = importlib.import_module(self.SETTINGS_MODULE) 129 except ImportError as e: 130 raise ImportError(

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/utils/importlib.pyc in import_module(name, package) 38 level += 1 39 name = _resolve_name(name[level:], package, level) ---> 40 import(name) 41 return sys.modules[name]

/proj/sot/ska/arch/x86_64-linuxCentOS-5/lib/python2.7/site-packages/kadi/settings.py in () 29 chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-=+)' 30 SECRET_KEY = ''.join([random.SystemRandom().choice(chars) for i in range(50)]) ---> 31 with open(_secret_file, 'w') as fh: 32 fh.write(SECRET_KEY) 33 try:

IOError: [Errno 13] Permission denied: '/proj/sot/ska/data/kadi/secret_key.txt'

In [2]:

— Reply to this email directly or view it on GitHub https://github.com/sot/kadi/issues/63.

Gregg140 commented 9 years ago

Jean -

1) not the middle of a conversation..the posting below is my first posting.

2) I am not trying to write any secret key. I have no knowledge of that. All I'm issuing are these three commands in a clean terminal:

source /proj/sot/ska/bin/ska_envs.csh ipython --pylab from kadi import events

That's it. That's all I'm doing. Everything after that is kadi whining about a secret key.

The whining starts with this:

Creating secret key file /proj/sot/ska/data/kadi/secret_key.txt

Gregg

On 01/20/2015 01:54 PM, Jean Connelly wrote:

Or wait, is your code just doing "from kadi import events"? I'm having trouble reading your traceback.

On Tue, Jan 20, 2015 at 1:53 PM, Jean Connelly < jeanconn@head.cfa.harvard.edu> wrote:

Hi Gregg,

I assume I'm getting this in the middle of a conversation, but can I have some back story? Why do you need to write a secret key into /proj/sot/ska?

Thanks, Jean

On Tue, Jan 20, 2015 at 1:44 PM, Gregg140 notifications@github.com wrote:

Had some code that used to work with kadi, now it can't even do the import. Commands and error messages below

acis-101: source /proj/sot/ska/bin/ska_envs.csh acis-102: ipython --pylab Python 2.7.1 (r271:86832, Feb 7 2011, 11:30:54) Type "copyright", "credits" or "license" for more information.

IPython 0.13.1 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details. Gtk-Message: Failed to load module "canberra-gtk-module": libcanberra-gtk-module.so: cannot open shared object file: No such file or directory Gtk-Message: Failed to load module "pk-gtk-module": libpk-gtk-module.so: cannot open shared object file: No such file or directory

Welcome to pylab, a matplotlib-based Python environment [backend: GTKAgg]. For more information, type 'help(pylab)'.

In [1]: from kadi import events Creating secret key file /proj/sot/ska/data/kadi/secret_key.txt

IOError Traceback (most recent call last) in () ----> 1 from kadi import events

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/kadi/events/ init.py in () 42 43 # from .models import ---> 44 from .query import

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/kadi/events/query.py in () 6 from Chandra.Time import DateTime 7 ----> 8 from . import models 9 from .models import IntervalPad 10

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/kadi/events/models.py in () 7 os.environ['DJANGO_SETTINGS_MODULE'] = 'kadi.settings' 8 ----> 9 from django.db import models 10 models.query.REPR_OUTPUT_SIZE = 1000 # Increase default number of rows printed 11

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/ init.py in () 3 from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured 4 from django.db.models.loading import get_apps, get_app_paths, get_app, get_models, get_model, register_models, UnavailableApp ----> 5 from django.db.models.query import Q 6 from django.db.models.expressions import F 7 from django.db.models.manager import Manager

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/query.py in () 15 from django.db.models.query_utils import (Q, select_related_descend, 16 deferred_class_factory, InvalidQuery) ---> 17 from django.db.models.deletion import Collector 18 from django.db.models import sql 19 from django.utils.functional import partition

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/deletion.py in () 2 3 from django.db import connections, transaction, IntegrityError ----> 4 from django.db.models import signals, sql 5 from django.utils.datastructures import SortedDict 6 from django.utils import six

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/sql/ init.py in () 2 3 from django.db.models.sql.datastructures import EmptyResultSet ----> 4 from django.db.models.sql.subqueries import 5 from django.db.models.sql.query import 6 from django.db.models.sql.where import AND, OR

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/sql/subqueries.py in () 10 from django.db.models.sql.constants import * 11 from django.db.models.sql.datastructures import Date, DateTime ---> 12 from django.db.models.sql.query import Query 13 from django.db.models.sql.where import AND, Constraint 14 from django.utils.functional import Promise

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/sql/query.py in () 20 from django.db.models.fields import FieldDoesNotExist 21 from django.db.models.related import PathInfo ---> 22 from django.db.models.sql import aggregates as base_aggregates_module 23 from django.db.models.sql.constants import (QUERY_TERMS, ORDER_DIR, SINGLE, 24 ORDER_PATTERN, JoinInfo, SelectInfo)

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/sql/aggregates.py in () 7 8 # Fake fields used to identify aggregate types in data-conversion operations. ----> 9 ordinal_aggregate_field = IntegerField() 10 computed_aggregate_field = FloatField() 11

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/db/models/fields/ init.pyc in init(self, verbose_name, name, primary_key, max_length, unique, blank, null, db_index, rel, default, editable, serialize, unique_for_date, unique_for_month, unique_for_year, choices, help_text, db_column, db_tablespace, auto_created, validators, error_messages) 114 self.help_text = help_text 115 self.db_column = db_column --> 116 self.db_tablespace = db_tablespace or settings.DEFAULT_INDEX_TABLESPACE 117 self.auto_created = auto_created 118

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/conf/ init.pyc in getattr(self, name) 52 def getattr(self, name): 53 if self._wrapped is empty: ---> 54 self._setup(name) 55 return getattr(self._wrapped, name) 56

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/conf/ init.pyc in _setup(self, name) 47 % (desc, ENVIRONMENT_VARIABLE)) 48 ---> 49 self._wrapped = Settings(settings_module) 50 self._configure_logging() 51

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/conf/ init.pyc in init(self, settings_module) 126 127 try: --> 128 mod = importlib.import_module(self.SETTINGS_MODULE) 129 except ImportError as e: 130 raise ImportError(

/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/django/utils/importlib.pyc in import_module(name, package) 38 level += 1 39 name = _resolve_name(name[level:], package, level) ---> 40 import(name) 41 return sys.modules[name]

/proj/sot/ska/arch/x86_64-linuxCentOS-5/lib/python2.7/site-packages/kadi/settings.py in () 29 chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-=+)' 30 SECRET_KEY = ''.join([random.SystemRandom().choice(chars) for i in range(50)]) ---> 31 with open(_secret_file, 'w') as fh: 32 fh.write(SECRET_KEY) 33 try:

IOError: [Errno 13] Permission denied: '/proj/sot/ska/data/kadi/secret_key.txt'

In [2]:

— Reply to this email directly or view it on GitHub https://github.com/sot/kadi/issues/63.

— Reply to this email directly or view it on GitHub https://github.com/sot/kadi/issues/63#issuecomment-70710066.

jeanconn commented 9 years ago

Gotcha. Thanks. I thought you'd copied and pasted code in, but I see now that was all the traceback from kadi. Tom, I see you put the secret key logic in at e07457e69 . How is that supposed to work again? I have trouble testing it for a user not a member of the aspect group. Should this be a world readable "secret" file?

taldcroft commented 9 years ago

@Gregg140 - can you try again? I changed permission on the key file to world readable. This is just something used by django for the web server, so it only needs to be secret from web clients.

Gregg140 commented 9 years ago

Works now.

Thanks!

On 01/20/2015 03:07 PM, Tom Aldcroft wrote:

@Gregg140 https://github.com/Gregg140 - can you try again? I changed permission on the key file to world readable. This is just something used by django for the web server, so it only needs to be secret from web clients.

— Reply to this email directly or view it on GitHub https://github.com/sot/kadi/issues/63#issuecomment-70723182.