endail / hx711-rpi-py

Python bindings for Raspberry Pi HX711 C++ Library
MIT License
11 stars 4 forks source link

`calibrate.py` error on RPi 4b #10

Closed gamename closed 7 months ago

gamename commented 7 months ago

Hi,

UPDATE: I got this by doing a wget from the PyPI instructions. When I go directly to the python repo and download a copy from there, it works.

I'm getting this when I try running calibrate.py:

Traceback (most recent call last):
  File "/home/tennis/calibrate.py", line 1, in <module>
    {"payload":{"allShortcutsEnabled":false,"fileTree":{"src":{"items":[{"name":"__init__.py","path":"src/__init__.py","contentType":"file"},{"name":"bindings.cpp","path":"src/bindings.cpp","contentType":"file"},{"name":"calibrate.py","path":"src/calibrate.py","contentType":"file"},{"name":"gh-actions-rpi-cmd.sh","path":"src/gh-actions-rpi-cmd.sh","contentType":"file"},{"name":"install-deps.sh","path":"src/install-deps.sh","contentType":"file"},{"name":"test.py","path":"src/test.py","contentType":"file"}],"totalCount":6},"":{"items":[{"name":".github","path":".github","contentType":"directory"},{"name":".vscode","path":".vscode","contentType":"directory"},{"name":"src","path":"src","contentType":"directory"},{"name":".bumpversion.cfg","path":".bumpversion.cfg","contentType":"file"},{"name":".gitattributes","path":".gitattributes","contentType":"file"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"hx711.gif","path":"hx711.gif","contentType":"file"},{"name":"pyproject.toml","path":"pyproject.toml","contentType":"file"},{"name":"setup.py","path":"setup.py","contentType":"file"}],"totalCount":11}},"fileTreeProcessingTime":7.314339,"foldersToFetch":[],"reducedMotionEnabled":null,"repo":{"id":396795607,"defaultBranch":"master","name":"hx711-rpi-py","ownerLogin":"endail","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2021-08-16T12:58:17.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/52652357?v=4","public":true,"private":false,"isOrgOwned":false},"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"master","listCacheKey":"v0:1674023666.25399","canEdit":false,"refType":"branch","currentOid":"d30b682b8814217144a3d7dc09bd183f0a55e68d"},"path":"src/calibrate.py","currentUser":null,"blob":{"rawLines":["import os","import sys","from datetime import timedelta","","from HX711 import *","","if len(sys.argv) != 3:","    print(\"Usage: calibrate.py [data pin] [clock pin]\", file=sys.stderr)","    sys.exit(os.EX_USAGE)","","try:","    hx = SimpleHX711(int(sys.argv[1]), int(sys.argv[2]), 1, 0)","except GpioException:","    print(\"Failed to connect to HX711 chip\", file=sys.stderr)","    sys.exit(os.EX_UNAVAILABLE)","except TimeoutException:","    print(\"Failed to connect to HX711 chip\", file=sys.stderr)","    sys.exit(os.EX_UNAVAILABLE)","","","print(\"\"\"","\\x1B[2J\\x1B[H","========================================","HX711 Calibration","========================================","","Find an object you know the weight of. If you can't find anything,","try searching Google for your phone's specifications to find its weight.","You can then use your phone to calibrate your scale.","\"\"\")","","unit = input(\"1. Enter the unit you want to measure the object in (eg. g, kg, lb, oz): \")","","knownWeight = float(input(\"2. Enter the weight of the object in the unit you chose (eg. \" +","                    \"if you chose 'g', enter the weight of the object in grams): \"))","","samples = int(input(\"3. Enter the number of samples to take from the HX711 chip (eg. 15): \"))","","input(\"4. Remove all objects from the scale and then press enter.\")","print(\"Working...\")","","zeroValue = hx.read(Options(int(samples)))","","input(\"5. Place object on the scale and then press enter.\")","print(\"Working...\")","","raw = hx.read(Options(int(samples)))","refUnitFloat = (raw - zeroValue) / knownWeight","refUnit = round(refUnitFloat, 0)","","if refUnit == 0:","    refUnit = 1","","print(","    \"\\n\\n\" +","    \"Known weight (your object) \" + str(knownWeight) + \" \" + unit + \"\\n\" +","    \"Raw value over \" + str(samples) + \" samples: \" + str(raw) + \"\\n\" +","    \"\\n\" +","    \"-> REFERENCE UNIT: \" + str(round(refUnit)) + \"\\n\" +","    \"-> ZERO VALUE: \" + str(round(zeroValue)) + \"\\n\" +","    \"\\n\" +","    \"You can provide these values to the constructor when you create the \"","    \"HX711 objects or later on. For example: \\n\" +","    \"\\n\" +","    \"hx = SimpleHX711(\" + sys.argv[1] + \", \" + sys.argv[2] + \", \" + ","    str(round(refUnit)) + \", \" + str(round(zeroValue)) + \")\\n\" +","    \"OR\\n\" +","    \"hx.setReferenceUnit(\" + str(round(refUnit)) + \") and \" +","    \"hx.setOffset(\" + str(round(zeroValue)) + \")\\n\"",")","","sys.exit(os.EX_OK)"],"stylingDirectives":[[{"start":0,"end":6,"cssClass":"pl-k"},{"start":7,"end":9,"cssClass":"pl-s1"}],[{"start":0,"end":6,"cssClass":"pl-k"},{"start":7,"end":10,"cssClass":"pl-s1"}],[{"start":0,"end":4,"cssClass":"pl-k"},{"start":5,"end":13,"cssClass":"pl-s1"},{"start":14,"end":20,"cssClass":"pl-k"},{"start":21,"end":30,"cssClass":"pl-s1"}],[],[{"start":0,"end":4,"cssClass":"pl-k"},{"start":5,"end":10,"cssClass":"pl-v"},{"start":11,"end":17,"cssClass":"pl-k"},{"start":18,"end":19,"cssClass":"pl-c1"}],[],[{"start":0,"end":2,"cssClass":"pl-k"},{"start":3,"end":6,"cssClass":"pl-en"},{"start":7,"end":10,"cssClass":"pl-s1"},{"start":11,"end":15,"cssClass":"pl-s1"},{"start":17,"end":19,"cssClass":"pl-c1"},{"start":20,"end":21,"cssClass":"pl-c1"}],[{"start":4,"end":9,"cssClass":"pl-en"},{"start":10,"end":54,"cssClass":"pl-s"},{"start":56,"end":60,"cssClass":"pl-s1"},{"start":60,"end":61,"cssClass":"pl-c1"},{"start":61,"end":64,"cssClass":"pl-s1"},{"start":65,"end":71,"cssClass":"pl-s1"}],[{"start":4,"end":7,"cssClass":"pl-s1"},{"start":8,"end":12,"cssClass":"pl-en"},{"start":13,"end":15,"cssClass":"pl-s1"},{"start":16,"end":24,"cssClass":"pl-v"}],[],[{"start":0,"end":3,"cssClass":"pl-k"}],[{"start":4,"end":6,"cssClass":"pl-s1"},{"start":7,"end":8,"cssClass":"pl-c1"},{"start":9,"end":20,"cssClass":"pl-v"},{"start":21,"end":24,"cssClass":"pl-en"},{"start":25,"end":28,"cssClass":"pl-s1"},{"start":29,"end":33,"cssClass":"pl-s1"},{"start":34,"end":35,"cssClass":"pl-c1"},{"start":39,"end":42,"cssClass":"pl-en"},{"start":43,"end":46,"cssClass":"pl-s1"},{"start":47,"end":51,"cssClass":"pl-s1"},{"start":52,"end":53,"cssClass":"pl-c1"},{"start":57,"end":58,"cssClass":"pl-c1"},{"start":60,"end":61,"cssClass":"pl-c1"}],[{"start":0,"end":6,"cssClass":"pl-k"},{"start":7,"end":20,"cssClass":"pl-v"}],[{"start":4,"end":9,"cssClass":"pl-en"},{"start":10,"end":43,"cssClass":"pl-s"},{"start":45,"end":49,"cssClass":"pl-s1"},{"start":49,"end":50,"cssClass":"pl-c1"},{"start":50,"end":53,"cssClass":"pl-s1"},{"start":54,"end":60,"cssClass":"pl-s1"}],[{"start":4,"end":7,"cssClass":"pl-s1"},{"start":8,"end":12,"cssClass":"pl-en"},{"start":13,"end":15,"cssClass":"pl-s1"},{"start":16,"end":30,"cssClass":"pl-v"}],[{"start":0,"end":6,"cssClass":"pl-k"},{"start":7,"end":23,"cssClass":"pl-v"}],[{"start":4,"end":9,"cssClass":"pl-en"},{"start":10,"end":43,"cssClass":"pl-s"},{"start":45,"end":49,"cssClass":"pl-s1"},{"start":49,"end":50,"cssClass":"pl-c1"},{"start":50,"end":53,"cssClass":"pl-s1"},{"start":54,"end":60,"cssClass":"pl-s1"}],[{"start":4,"end":7,"cssClass":"pl-s1"},{"start":8,"end":12,"cssClass":"pl-en"},{"start":13,"end":15,"cssClass":"pl-s1"},{"start":16,"end":30,"cssClass":"pl-v"}],[],[],[{"start":0,"end":5,"cssClass":"pl-en"},{"start":6,"end":9,"cssClass":"pl-s"}],[{"start":0,"end":13,"cssClass":"pl-s"},{"start":0,"end":4,"cssClass":"pl-cce"},{"start":7,"end":11,"cssClass":"pl-cce"}],[{"start":0,"end":40,"cssClass":"pl-s"}],[{"start":0,"end":17,"cssClass":"pl-s"}],[{"start":0,"end":40,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":52,"cssClass":"pl-s"}],[{"start":0,"end":3,"cssClass":"pl-s"}],[],[{"start":0,"end":4,"cssClass":"pl-s1"},{"start":5,"end":6,"cssClass":"pl-c1"},{"start":7,"end":12,"cssClass":"pl-en"},{"start":13,"end":88,"cssClass":"pl-s"}],[],[{"start":0,"end":11,"cssClass":"pl-s1"},{"start":12,"end":13,"cssClass":"pl-c1"},{"start":14,"end":19,"cssClass":"pl-en"},{"start":20,"end":25,"cssClass":"pl-en"},{"start":26,"end":89,"cssClass":"pl-s"},{"start":90,"end":91,"cssClass":"pl-c1"}],[{"start":20,"end":82,"cssClass":"pl-s"}],[],[{"start":0,"end":7,"cssClass":"pl-s1"},{"start":8,"end":9,"cssClass":"pl-c1"},{"start":10,"end":13,"cssClass":"pl-en"},{"start":14,"end":19,"cssClass":"pl-en"},{"start":20,"end":91,"cssClass":"pl-s"}],[],[{"start":0,"end":5,"cssClass":"pl-en"},{"start":6,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":5,"cssClass":"pl-en"},{"start":6,"end":18,"cssClass":"pl-s"}],[],[{"start":0,"end":9,"cssClass":"pl-s1"},{"start":10,"end":11,"cssClass":"pl-c1"},{"start":12,"end":14,"cssClass":"pl-s1"},{"start":15,"end":19,"cssClass":"pl-en"},{"start":20,"end":27,"cssClass":"pl-v"},{"start":28,"end":31,"cssClass":"pl-en"},{"start":32,"end":39,"cssClass":"pl-s1"}],[],[{"start":0,"end":5,"cssClass":"pl-en"},{"start":6,"end":58,"cssClass":"pl-s"}],[{"start":0,"end":5,"cssClass":"pl-en"},{"start":6,"end":18,"cssClass":"pl-s"}],[],[{"start":0,"end":3,"cssClass":"pl-s1"},{"start":4,"end":5,"cssClass":"pl-c1"},{"start":6,"end":8,"cssClass":"pl-s1"},{"start":9,"end":13,"cssClass":"pl-en"},{"start":14,"end":21,"cssClass":"pl-v"},{"start":22,"end":25,"cssClass":"pl-en"},{"start":26,"end":33,"cssClass":"pl-s1"}],[{"start":0,"end":12,"cssClass":"pl-s1"},{"start":13,"end":14,"cssClass":"pl-c1"},{"start":16,"end":19,"cssClass":"pl-s1"},{"start":20,"end":21,"cssClass":"pl-c1"},{"start":22,"end":31,"cssClass":"pl-s1"},{"start":33,"end":34,"cssClass":"pl-c1"},{"start":35,"end":46,"cssClass":"pl-s1"}],[{"start":0,"end":7,"cssClass":"pl-s1"},{"start":8,"end":9,"cssClass":"pl-c1"},{"start":10,"end":15,"cssClass":"pl-en"},{"start":16,"end":28,"cssClass":"pl-s1"},{"start":30,"end":31,"cssClass":"pl-c1"}],[],[{"start":0,"end":2,"cssClass":"pl-k"},{"start":3,"end":10,"cssClass":"pl-s1"},{"start":11,"end":13,"cssClass":"pl-c1"},{"start":14,"end":15,"cssClass":"pl-c1"}],[{"start":4,"end":11,"cssClass":"pl-s1"},{"start":12,"end":13,"cssClass":"pl-c1"},{"start":14,"end":15,"cssClass":"pl-c1"}],[],[{"start":0,"end":5,"cssClass":"pl-en"}],[{"start":4,"end":10,"cssClass":"pl-s"},{"start":5,"end":7,"cssClass":"pl-cce"},{"start":7,"end":9,"cssClass":"pl-cce"},{"start":11,"end":12,"cssClass":"pl-c1"}],[{"start":4,"end":33,"cssClass":"pl-s"},{"start":34,"end":35,"cssClass":"pl-c1"},{"start":36,"end":39,"cssClass":"pl-en"},{"start":40,"end":51,"cssClass":"pl-s1"},{"start":53,"end":54,"cssClass":"pl-c1"},{"start":55,"end":58,"cssClass":"pl-s"},{"start":59,"end":60,"cssClass":"pl-c1"},{"start":61,"end":65,"cssClass":"pl-s1"},{"start":66,"end":67,"cssClass":"pl-c1"},{"start":68,"end":72,"cssClass":"pl-s"},{"start":69,"end":71,"cssClass":"pl-cce"},{"start":73,"end":74,"cssClass":"pl-c1"}],[{"start":4,"end":21,"cssClass":"pl-s"},{"start":22,"end":23,"cssClass":"pl-c1"},{"start":24,"end":27,"cssClass":"pl-en"},{"start":28,"end":35,"cssClass":"pl-s1"},{"start":37,"end":38,"cssClass":"pl-c1"},{"start":39,"end":51,"cssClass":"pl-s"},{"start":52,"end":53,"cssClass":"pl-c1"},{"start":54,"end":57,"cssClass":"pl-en"},{"start":58,"end":61,"cssClass":"pl-s1"},{"start":63,"end":64,"cssClass":"pl-c1"},{"start":65,"end":69,"cssClass":"pl-s"},{"start":66,"end":68,"cssClass":"pl-cce"},{"start":70,"end":71,"cssClass":"pl-c1"}],[{"start":4,"end":8,"cssClass":"pl-s"},{"start":5,"end":7,"cssClass":"pl-cce"},{"start":9,"end":10,"cssClass":"pl-c1"}],[{"start":4,"end":25,"cssClass":"pl-s"},{"start":26,"end":27,"cssClass":"pl-c1"},{"start":28,"end":31,"cssClass":"pl-en"},{"start":32,"end":37,"cssClass":"pl-en"},{"start":38,"end":45,"cssClass":"pl-s1"},{"start":48,"end":49,"cssClass":"pl-c1"},{"start":50,"end":54,"cssClass":"pl-s"},{"start":51,"end":53,"cssClass":"pl-cce"},{"start":55,"end":56,"cssClass":"pl-c1"}],[{"start":4,"end":21,"cssClass":"pl-s"},{"start":22,"end":23,"cssClass":"pl-c1"},{"start":24,"end":27,"cssClass":"pl-en"},{"start":28,"end":33,"cssClass":"pl-en"},{"start":34,"end":43,"cssClass":"pl-s1"},{"start":46,"end":47,"cssClass":"pl-c1"},{"start":48,"end":52,"cssClass":"pl-s"},{"start":49,"end":51,"cssClass":"pl-cce"},{"start":53,"end":54,"cssClass":"pl-c1"}],[{"start":4,"end":8,"cssClass":"pl-s"},{"start":5,"end":7,"cssClass":"pl-cce"},{"start":9,"end":10,"cssClass":"pl-c1"}],[{"start":4,"end":74,"cssClass":"pl-s"}],[{"start":4,"end":48,"cssClass":"pl-s"},{"start":45,"end":47,"cssClass":"pl-cce"},{"start":49,"end":50,"cssClass":"pl-c1"}],[{"start":4,"end":8,"cssClass":"pl-s"},{"start":5,"end":7,"cssClass":"pl-cce"},{"start":9,"end":10,"cssClass":"pl-c1"}],[{"start":4,"end":23,"cssClass":"pl-s"},{"start":24,"end":25,"cssClass":"pl-c1"},{"start":26,"end":29,"cssClass":"pl-s1"},{"start":30,"end":34,"cssClass":"pl-s1"},{"start":35,"end":36,"cssClass":"pl-c1"},{"start":38,"end":39,"cssClass":"pl-c1"},{"start":40,"end":44,"cssClass":"pl-s"},{"start":45,"end":46,"cssClass":"pl-c1"},{"start":47,"end":50,"cssClass":"pl-s1"},{"start":51,"end":55,"cssClass":"pl-s1"},{"start":56,"end":57,"cssClass":"pl-c1"},{"start":59,"end":60,"cssClass":"pl-c1"},{"start":61,"end":65,"cssClass":"pl-s"},{"start":66,"end":67,"cssClass":"pl-c1"}],[{"start":4,"end":7,"cssClass":"pl-en"},{"start":8,"end":13,"cssClass":"pl-en"},{"start":14,"end":21,"cssClass":"pl-s1"},{"start":24,"end":25,"cssClass":"pl-c1"},{"start":26,"end":30,"cssClass":"pl-s"},{"start":31,"end":32,"cssClass":"pl-c1"},{"start":33,"end":36,"cssClass":"pl-en"},{"start":37,"end":42,"cssClass":"pl-en"},{"start":43,"end":52,"cssClass":"pl-s1"},{"start":55,"end":56,"cssClass":"pl-c1"},{"start":57,"end":62,"cssClass":"pl-s"},{"start":59,"end":61,"cssClass":"pl-cce"},{"start":63,"end":64,"cssClass":"pl-c1"}],[{"start":4,"end":10,"cssClass":"pl-s"},{"start":7,"end":9,"cssClass":"pl-cce"},{"start":11,"end":12,"cssClass":"pl-c1"}],[{"start":4,"end":26,"cssClass":"pl-s"},{"start":27,"end":28,"cssClass":"pl-c1"},{"start":29,"end":32,"cssClass":"pl-en"},{"start":33,"end":38,"cssClass":"pl-en"},{"start":39,"end":46,"cssClass":"pl-s1"},{"start":49,"end":50,"cssClass":"pl-c1"},{"start":51,"end":59,"cssClass":"pl-s"},{"start":60,"end":61,"cssClass":"pl-c1"}],[{"start":4,"end":19,"cssClass":"pl-s"},{"start":20,"end":21,"cssClass":"pl-c1"},{"start":22,"end":25,"cssClass":"pl-en"},{"start":26,"end":31,"cssClass":"pl-en"},{"start":32,"end":41,"cssClass":"pl-s1"},{"start":44,"end":45,"cssClass":"pl-c1"},{"start":46,"end":51,"cssClass":"pl-s"},{"start":48,"end":50,"cssClass":"pl-cce"}],[],[],[{"start":0,"end":3,"cssClass":"pl-s1"},{"start":4,"end":8,"cssClass":"pl-en"},{"start":9,"end":11,"cssClass":"pl-s1"},{"start":12,"end":17,"cssClass":"pl-v"}]],"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/endail/hx711-rpi-py/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null,"repoAlertsPath":"/endail/hx711-rpi-py/security/dependabot","repoSecurityAndAnalysisPath":"/endail/hx711-rpi-py/settings/security_analysis","repoOwnerIsOrg":false,"currentUserCanAdminRepo":false},"displayName":"calibrate.py","displayUrl":"https://github.com/endail/hx711-rpi-py/blob/master/src/calibrate.py?raw=true","headerInfo":{"blobSize":"2.22 KB","deleteInfo":{"deleteTooltip":"You must be signed in to make or propose changes"},"editInfo":{"editTooltip":"You must be signed in to make or propose changes"},"ghDesktopPath":"https://desktop.github.com","gitLfsPath":null,"onBranch":true,"shortPath":"9faf8a5","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fendail%2Fhx711-rpi-py%2Fblob%2Fmaster%2Fsrc%2Fcalibrate.py","isCSV":false,"isRichtext":false,"toc":null,"lineInfo":{"truncatedLoc":"72","truncatedSloc":"56"},"mode":"file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplateHelpUrl":"https://docs.github.com/articles/about-issue-and-pull-request-templates","issueTemplate":null,"discussionTemplate":null,"language":"Python","languageID":303,"large":false,"loggedIn":false,"newDiscussionPath":"/endail/hx711-rpi-py/discussions/new","newIssuePath":"/endail/hx711-rpi-py/issues/new","planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/endail/hx711-rpi-py/blob/master/src/calibrate.py","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","dismissStackNoticePath":"/settings/dismiss-notice/publish_stack_from_file","releasePath":"/endail/hx711-rpi-py/releases/new?marketplace=true","showPublishActionBanner":false,"showPublishStackBanner":false},"rawBlobUrl":"https://github.com/endail/hx711-rpi-py/raw/master/src/calibrate.py","renderImageOrRaw":false,"richText":null,"renderedFileInfo":null,"shortPath":null,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"repoOwner":"endail","repoName":"hx711-rpi-py","showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","showDependabotConfigurationBanner":false,"actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":{"timed_out":false,"not_analyzed":false,"symbols":[{"name":"unit","kind":"constant","ident_start":826,"ident_end":830,"extent_start":826,"extent_end":915,"fully_qualified_name":"unit","ident_utf16":{"start":{"line_number":31,"utf16_col":0},"end":{"line_number":31,"utf16_col":4}},"extent_utf16":{"start":{"line_number":31,"utf16_col":0},"end":{"line_number":31,"utf16_col":89}}},{"name":"knownWeight","kind":"constant","ident_start":917,"ident_end":928,"extent_start":917,"extent_end":1093,"fully_qualified_name":"knownWeight","ident_utf16":{"start":{"line_number":33,"utf16_col":0},"end":{"line_number":33,"utf16_col":11}},"extent_utf16":{"start":{"line_number":33,"utf16_col":0},"end":{"line_number":34,"utf16_col":84}}},{"name":"samples","kind":"constant","ident_start":1095,"ident_end":1102,"extent_start":1095,"extent_end":1188,"fully_qualified_name":"samples","ident_utf16":{"start":{"line_number":36,"utf16_col":0},"end":{"line_number":36,"utf16_col":7}},"extent_utf16":{"start":{"line_number":36,"utf16_col":0},"end":{"line_number":36,"utf16_col":93}}},{"name":"zeroValue","kind":"constant","ident_start":1279,"ident_end":1288,"extent_start":1279,"extent_end":1321,"fully_qualified_name":"zeroValue","ident_utf16":{"start":{"line_number":41,"utf16_col":0},"end":{"line_number":41,"utf16_col":9}},"extent_utf16":{"start":{"line_number":41,"utf16_col":0},"end":{"line_number":41,"utf16_col":42}}},{"name":"raw","kind":"constant","ident_start":1404,"ident_end":1407,"extent_start":1404,"extent_end":1440,"fully_qualified_name":"raw","ident_utf16":{"start":{"line_number":46,"utf16_col":0},"end":{"line_number":46,"utf16_col":3}},"extent_utf16":{"start":{"line_number":46,"utf16_col":0},"end":{"line_number":46,"utf16_col":36}}},{"name":"refUnitFloat","kind":"constant","ident_start":1441,"ident_end":1453,"extent_start":1441,"extent_end":1487,"fully_qualified_name":"refUnitFloat","ident_utf16":{"start":{"line_number":47,"utf16_col":0},"end":{"line_number":47,"utf16_col":12}},"extent_utf16":{"start":{"line_number":47,"utf16_col":0},"end":{"line_number":47,"utf16_col":46}}},{"name":"refUnit","kind":"constant","ident_start":1488,"ident_end":1495,"extent_start":1488,"extent_end":1520,"fully_qualified_name":"refUnit","ident_utf16":{"start":{"line_number":48,"utf16_col":0},"end":{"line_number":48,"utf16_col":7}},"extent_utf16":{"start":{"line_number":48,"utf16_col":0},"end":{"line_number":48,"utf16_col":32}}}]}},"copilotInfo":null,"copilotAccessAllowed":false,"csrf_tokens":{"/endail/hx711-rpi-py/branches":{"post":"BkBYObWMelRk-qPmcr3OsJX1VnOMQu0itWpenvYaWbsRIM_sj6-mSNrZ3eZ5wUamaFJIDbS2t6EwheN9NZEr8Q"},"/repos/preferences":{"post":"hP8-d82ApH333vuJZJFqJ0iE1oDCUjh9n4-2oy4tHwrE2S8q6D5AUYI3rSbRyCCN4inLc4QzlDDm-GaLDyU6KA"}}},"title":"hx711-rpi-py/src/calibrate.py at master · endail/hx711-rpi-py"}
NameError: name 'false' is not defined
System Information for Raspberry Pi
===================================

1. CPU Information:
Hardware    : BCM2835
Revision    : d03114

2. Memory Information:
MemTotal:        7999808 kB
MemFree:         7425812 kB
MemAvailable:    7779084 kB

3. Disk Usage:
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       117G  2.5G  110G   3% /

4. Operating System Details:
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:    11
Codename:   bullseye

5. Kernel Details:
Linux armadillo 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux

6. Current CPU Temperature:
temp=45.7'C

7. Throttling Status:
throttled=0x0

8. Network Information:
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        inet 192.168.0.166  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::2126:8bee:e620:e96a  prefixlen 64  scopeid 0x20<link>

9. Python Version:
Python 3.9.2
endail commented 7 months ago

Hi,

Where are the instructions you followed which gave you the error so I can correct them?

gamename commented 7 months ago

@endail At the bottom of this page: https://pypi.org/project/hx711-rpi-py/

endail commented 7 months ago

Thanks!

I've fixed this on GitHub, but it will take some time to propagate to PyPI.