Skip to content

Error parsing RKM formatted resistance #12063

Closed

Description

@CraigBurden

Please verify that this bug has NOT been raised before.

  • I checked and didn't find a similar issue

Describe the bug*

When adding a "Resistance' parameter to my part with the 'ohms' (or RKM) unit the parsing seems to be off. Specifically the 'R' delimiter seems to be yielding x10¹⁸ instead of x10⁰. When giving my resistor a resitance of 10R the tooltip says that this "10,000,000,000,000,000,000,000,000,000 [ohms]". The RKM suport seems to be working correctly for 'k', 'm' and 'p' for example.

Image

Trying to reproduce on the demo:

Image

Steps to Reproduce

  1. Create a parameter template with the 'ohms' or 'RKM' unit
  2. Add a parameter to a part with this template
  3. Set the value of the parameter to '10R' or '1R2' for example

Expected behaviour

'10R' should evaluate as 10.0 ohms, 1R2 should evaluate as 1.2 ohms

Deployment Method

Docker

Version Information

InvenTree-Version: 1.3.2
Django Version: 5.2.13
Commit Hash: a60e85b
Commit Date: 2026-05-05
Commit Branch: null
Database: django.db.backends.postgresql
Debug-Mode: False
Deployed using Docker: True
Platform: Linux-6.8.0-117-generic-x86_64-with-glibc2.41
Installer: DOC
Active plugins: [{"name":"InvenTreeBarcode","slug":"inventreebarcode","version":"2.2.0"},{"name":"BOM Exporter","slug":"bom-exporter","version":"1.1.0"},{"name":"InvenTree Exporter","slug":"inventree-exporter","version":"1.0.0"},{"name":"Parameter Exporter","slug":"parameter-exporter","version":"2.0.0"},{"name":"InvenTreeEmailNotifications","slug":"inventree-email-notification","version":"1.0.0"},{"name":"InvenTreeUINotifications","slug":"inventree-ui-notification","version":"1.0.0"},{"name":"InvenTreeCurrencyExchange","slug":"inventreecurrencyexchange","version":"1.0.0"},{"name":"InvenTreeMachines","slug":"inventree-machines","version":"1.0.0"},{"name":"InvenTreeLabel","slug":"inventreelabel","version":"1.1.0"},{"name":"InvenTreeLabelMachine","slug":"inventreelabelmachine","version":"1.0.0"},{"name":"DigiKeyBarcodePlugin","slug":"digikeyplugin","version":"1.0.1"},{"name":"ChangeLogPlugin","slug":"changelog","version":"1.0.13"},{"name":"IPNGenerator","slug":"ipngen","version":"0.1"},{"name":"KiCadLibraryPlugin","slug":"kicad-library-plugin","version":"2.0.4"}]

Try to reproduce on the demo site

I tried to reproduce

Is the bug reproducible on the demo site?

Not reproducible

Relevant log output

Activity

  1. added
    bug
    question
    triage:not-checked
    on Jun 1, 2026
  2. wolflu05 commented on Jun 1, 2026

    @wolflu05
    Member

    This may be related #11821

  3. removed
    bug
    triage:not-checked
    on Jun 1, 2026
  4. matmair commented on Jun 1, 2026

    @matmair
    Member

    This was already answered in #11821 (comment)
    R is a valid SI system prefix that equates to 10 power 27

  5. added
    duplicate
    on Jun 1, 2026
  6. SchrodingersGat commented on Jun 2, 2026

    @SchrodingersGat
    Member

    I have proposed a fix for this in #12065

  7. added this to the 1.4.0 milestone on Jun 2, 2026
  8. CraigBurden commented on Jun 2, 2026

    @CraigBurden
    Author

    Thanks all, apologies for bringing this up again, I checked issues not discussions for the issue.
    Either way, thanks for the quick fix!

  9. wolflu05 commented on Jun 2, 2026

    @wolflu05
    Member

    Do we need to mention this as a breaking change now, or can we just assume that nobody is using the R si value anyway?

  10. matmair commented on Jun 2, 2026

    @matmair
    Member

    I think this an obscure enough edge case that it does not need to be in the blog but we could add it to the changelog

  11. CraigBurden commented on Jun 2, 2026

    @CraigBurden
    Author

    I'll chime in here, as part of the what I assume is a significant majority of people who didn't know that Ronna- existed, as well as the tiny chance that it would be used within the context of Inventree. I'd say its not worth a brekaing change notification. It was actually more confusing that it behaved the way it did until now, hence the issue and others opened prior to mine.

    What I would recommend though, is a bit more documentation about units in general. The current docs more or less say that units exist and that if you want to know anything about them you should look at the pint docs. What about a very shallow explanation of what units exist and how they are used/parsed?

    I'm happy to contribute to that

  12. SchrodingersGat commented on Jun 3, 2026

    @SchrodingersGat
    Member

    I'm happy to contribute to that

    @CraigBurden we would happily accept a PR to improve the documentation around this :)

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

    duplicatequestion

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions