Uploaded image for project: 'The Virtual Brain'
  1. The Virtual Brain
  2. TVB-2806

Unable to subclass stimulus in neotraits

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.0.10
    • None
    • None
    • VBC Sprint 9
    • 8.2 Pipeline Integration

    Description

      User Anna Cattani reports not being able to use the multiple stimuli subclass in the Python 3 version of TVB (neotraits) which worked previously. We exchanged email to identify that neotraits is requiring all attributes to be filled out, but now we have a harder one

      Traceback (most recent call last):
        File "/opt/anaconda3/envs/tvb-run/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3417, in run_code
          exec(code_obj, self.user_global_ns, self.user_ns)
        File "<ipython-input-4-5b3ba5ae7a31>", line 1, in <module>
          stimulus.configure()
        File "/Users/ac/Documents/repositories/tvb-root/scientific_library/tvb/basic/neotraits/_core.py", line 224, in configure
          self.validate()
        File "/Users/ac/Documents/repositories/tvb-root/scientific_library/tvb/basic/neotraits/_core.py", line 216, in validate
          getattr(self, k)
        File "/Users/ac/Documents/repositories/tvb-root/scientific_library/tvb/basic/neotraits/_attr.py", line 170, in __get__
          'Use a default or assign a value before reading it', attr=self)
      tvb.basic.neotraits.ex.TraitAttributeError: required attribute referenced before assignment. Use a default or assign a value before reading it
        attribute tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class 'uuid.UUID'>, default=None, required=True)
      

      This is reported for `sim.configure()` and `stimulus.configure()`.

      Why would a script using the library need GIDs? How to tell traits to shut up about this?

      Gliffy Diagrams

        Attachments

          Activity

            People

              paula.popa Paula Prodan
              marmaduke.woodman Marmaduke Woodman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 2 hours
                  2h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours
                  2h