Skip to content

fix infinite recursion#11

Merged
adrn merged 1 commit into
adrn:coordinates/affine-transformsfrom
eteq:coordinates/affine-transforms-recfix
Jun 11, 2017
Merged

fix infinite recursion#11
adrn merged 1 commit into
adrn:coordinates/affine-transformsfrom
eteq:coordinates/affine-transforms-recfix

Conversation

@eteq

@eteq eteq commented Jun 11, 2017

Copy link
Copy Markdown

turns out there were two problems:

  • representation_component_names was changed to do self._representation instead of self.representation. That doesn't work because self.representation initializes an absent _representation.
  • self._data.differential was failing when _data was None or differentials were absent

turns out there were *two* problems: self._representation was being used instead of self.representation (which initializes an absent _representation), and self._data.differential was failing when _data was None or differentials were absent
@adrn

adrn commented Jun 11, 2017

Copy link
Copy Markdown
Owner

thanks!!

@adrn adrn merged commit 62af5cd into adrn:coordinates/affine-transforms Jun 11, 2017
@adrn

adrn commented Jun 11, 2017

Copy link
Copy Markdown
Owner

@eteq Oops, this didn't actually fix the recursion...but I just figured it out!

The offending line turns out to be: calling repr_diff_cls.recommended_units (in BaseCoordinateFrame._get_representation_info()) on a Differential class. I have no idea why this causes a recursion error, but the Differential classes don't have a recommended_units attribute (something I mentioned in Marten's PR). I added recommended_units = {} to BaseDifferential and the recursion error seems to have gone away...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants