Open chrisroat opened 2 years ago
If no context is indicated, the schema
object uses the local context where it's invoked to look for the table classes. This may get into some of Python's namespace handling quirks. But just as a test, could you try passing the locals()
contents explicitly?
schema = dj.schema('acquisition', context=locals())
Thanks for the suggestion. I tried that, and then also moving schema
inside the class. Neither seems to work.
We have never considered declaring table classes inside other classes. Here is the line where this evaluation takes place. I don't see why it would not work but Python has a few quirks about how it namespaces are handled with classes.
Bug Report
Description
When schema tables are nested within a class, datajoint cannot find an elements table. The problem seems to be related to a change in context, but even if I nest the
activate
call orschema
assignment, it is not found.Reproducibility
Include:
Expected Behavior
The schema should be created without errors.