Skip to content

Literature list fails to get version of AMUSE #1187

@DavidJJansen

Description

@DavidJJansen

Describe the bug
At the end of running a code, the literature list will report: "AMUSE (unknown version)" in stead of showing the version in use (2025.9.0)

To Reproduce
Install AMUSE 2025.9.0 and run any code (eg an example).
At the end the output reads:

In this session you have used the AMUSE modules below.
Please cite any relevant articles:

"AMUSE (unknown version)"
	DOI:10.5281/zenodo.1435860
	ADS:2018araa.book.....P (Portegies Zwart, S. & McMillan, S.L.W., 2018)
	ADS:2013CoPhC.183..456P ** (Portegies Zwart, S. et al., 2013)
	ADS:2013A&A...557A..84P ** (Pelupessy, F. I. et al., 2013)
	ADS:2009NewA...14..369P (Portegies Zwart, S. et al., 2009)

Expected behavior
Same output, but with the actual version number displayed.

Logs
If applicable, add logfiles to help explain your problem.

Environment (please complete the following information):

  • AMUSE 2025.9.0
  • OS and version: Linux, RHEL 9
  • Compiler: gcc 13, from anaconda

Additional context
src/amuse/support/literature.py contains:

try:
from amuse._version import version as amuse_version
except ImportError:
amuse_version = "unknown version"

which fails, whereas obtaining the version as amuse.version reports correctly.
The failure is of course hidden by the "try ... except" construction.

The content of the installed src/amuse/_version.py is:
version = "2025.9.0"

So either this is incorrect, or the reference in literature.py needs to be changed to match.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: building/installingIssue relates to the build system and installing from sourcearea: frameworkIssues related to the AMUSE framework: rfi, amusifier, MPI issueskind: bug

    Type

    No type

    Projects

    Status

    Bug

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions