Skip to content

astropy.units.core.UnitConversionError: 's / m' and 's / m' are not convertible #587

Description

@StanczakDominik

https://travis-ci.org/PlasmaPy/PlasmaPy/jobs/466396211

After wrestling with system packages (conda, pip and pacman, argh!), I've managed to figure out that this is localized to astropy 3.1. Also, running python setup.py test -d and getting into plasmapy.physics.distribution.Maxwellian_1D:

(Pdb) distFunc
<Quantity 5.91632969e-07 s / m>
(Pdb) p u.s / u.m
Unit("s / m")
(Pdb) p distFunc
<Quantity 5.91632969e-07 s / m>
(Pdb) p distFunc.unit
Unit("s / m")
(Pdb) p distFunc.to(u.s / u.m)
*** astropy.units.core.UnitConversionError: 's / m' and 's / m' are not convertible

Activity

  1. added
    bugIssues describing unexpected behavior or defects. Remember: a bug is a sign of a missing test!
    priority: very highIssues & PRs of the highest urgency (e.g., broken CI and critical bug fixes)
    upstream fix requiredIssues & PRs that are blocked due to a problem with a dependency
    on Dec 11, 2018
  2. StanczakDominik commented on Dec 12, 2018

    @StanczakDominik
    MemberAuthor

    Looks like this is going to be fixed for Astropy 3.1.1 in astropy/astropy#8263 which leaves us to figure out how to block 3.1 in requirements. Basically we want to say Astropy >= 3.0.2 & Astropy != 3.1.0"

  3. manasbedmutha98 commented on Dec 12, 2018

    @manasbedmutha98
    Contributor

    I could find only this as the package installation file having astropy. Should this be made to Astropy >= 3.0.2 & Astropy != 3.1.0" or I am missing something?

    astropy (>= 2.0)

  4. ritiek commented on Dec 13, 2018

    @ritiek
    Contributor

    @manasbedmutha98 Yep, modifying that line to a format which requirements.txt accepts would be the way to go. I think replacing it with something like astropy (>= 3.0.2, != 3.1.0) should work.

    Perhaps it would be also be a good idea to add a comment in requirements.txt referencing this issue for why we do not want astropy v3.1.0.

  5. ritiek commented on Dec 13, 2018

    @ritiek
    Contributor

    Wait. This doesn't seems to be working. If I pip install "astropy==3.1.0" and then modify the astropy line in requirements.txt to astropy (>= 3.0.2, != 3.1.0). It doesn't seem to install a different version (anything other than v3.1.0) when running python setup.py install.

    This seems a problem specific to PlasmaPy as I am able to create a dummy test.txt with a line containing astropy (>= 3.0.2, != 3.1.0) and then when installing it with pip install -r test.txt it indeed downgrades to v3.0.5 from v3.1.0.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssues describing unexpected behavior or defects. Remember: a bug is a sign of a missing test!priority: very highIssues & PRs of the highest urgency (e.g., broken CI and critical bug fixes)upstream fix requiredIssues & PRs that are blocked due to a problem with a dependency

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions