thegetty / arches-urldatatype

The URL Datatype for Arches, organized into an Arches package for ease of addition.
GNU Affero General Public License v3.0
0 stars 0 forks source link

fn_config has no attribute 'details' #1

Closed azaroth42 closed 4 years ago

azaroth42 commented 4 years ago

python manage.py packages -o load_package -s https://github.com/thegetty/arches-urldatatype/archive/v1.1.zip -y

Generates this traceback:

Traceback (most recent call last):
  File "manage.py", line 27, in <module>
    execute_from_command_line(sys.argv)
  File "/Users/rsanderson/Development/getty/arches/test/ENV/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/Users/rsanderson/Development/getty/arches/test/ENV/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/rsanderson/Development/getty/arches/test/ENV/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/Users/rsanderson/Development/getty/arches/test/ENV/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/Users/rsanderson/Development/getty/arches/2019_sow/arches/arches/management/commands/packages.py", line 294, in handle
    options['yes'])
  File "/Users/rsanderson/Development/getty/arches/2019_sow/arches/arches/management/commands/packages.py", line 790, in load_package
    management.call_command('project', 'update')
  File "/Users/rsanderson/Development/getty/arches/test/ENV/lib/python2.7/site-packages/django/core/management/__init__.py", line 131, in call_command
    return command.execute(*args, **defaults)
  File "/Users/rsanderson/Development/getty/arches/test/ENV/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/Users/rsanderson/Development/getty/arches/2019_sow/arches/arches/management/commands/project.py", line 44, in handle
    self.update_extensions()
  File "/Users/rsanderson/Development/getty/arches/2019_sow/arches/arches/management/commands/project.py", line 64, in update_extensions
    self.register('functions', 'fn')
  File "/Users/rsanderson/Development/getty/arches/2019_sow/arches/arches/management/commands/project.py", line 54, in register
    management.call_command(cmd, 'register', source=module)
  File "/Users/rsanderson/Development/getty/arches/test/ENV/lib/python2.7/site-packages/django/core/management/__init__.py", line 131, in call_command
    return command.execute(*args, **defaults)
  File "/Users/rsanderson/Development/getty/arches/test/ENV/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/Users/rsanderson/Development/getty/arches/2019_sow/arches/arches/management/commands/fn.py", line 44, in handle
    self.register(source=options['fn_source'])
  File "/Users/rsanderson/Development/getty/arches/2019_sow/arches/arches/management/commands/fn.py", line 67, in register
    details = fn_config.details
AttributeError: 'module' object has no attribute 'details'

Not sure if this is a new package API requirement or why the error is happening :(

azaroth42 commented 4 years ago

Same error occurs with local copy of the file (as anticipated). Previous issue with missing APP_ROOT isn't the cause (it's in settings_local.py).

benosteen commented 4 years ago

I'll try building a new container from master, and try to load in the package and see if I replicate this so I can pin down why it happened.

azaroth42 commented 4 years ago

Thanks Ben! I'm working from current master. Can experiment with a previous version, but in order to test archesproject/#5299 it would be good to have it aligned. Hopefully not too much work!

benosteen commented 4 years ago

The error comes when it attempts to load an internal file '$APP_ROOT/arches/app/functions/primary_descriptors.py' using the fn.py plugin loader. Why this is I am not sure, I have asked on the slack. I am beginning to suspect that they anticipate that all packages would be loaded into blank or separate Arches 'projects' and that trying to add one to the root instance is not their use pattern.

benosteen commented 4 years ago

Yep, I just had it confirmed that the assumption is that Arches will be installed and then you will set up an Arches 'project' and that the package installation/handling code is written based on this assumption