-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Crash during invenTree part creation, only halfway created parts #97
Comments
Hello there @Fivefold - Thanks for filling in an issue with a lot of details! So I noticed two things are happening here:
|
Can report that it "works" now without any changes on my part after I upgraded to InvenTree 0.8.0 (even though the fix in inventree/inventree-python#131 is supposed to be merged only in 0.8.1) There are some new POST request-related errors in the log for I will report back once 0.8.1 is added as a docker image. Edit: I realize that I used a default category this time and it worked because of this. Same behaviour when using a category without parameters.
Since I don't see any references to the parameter list in the readme, is this something that's supposed to be created by the setup script or by hand? And where would one find the correct parameter terms to be auto-populated when fetching from a distributor aside from the default supplier_parameters.yaml? What's the intended workflow here? |
CATEGORY_NAME:
INVENTREE_PARAMETER_NAME:
- SUPPLIER_1_PARAMETER_NAME_1
- SUPPLIER_1_PARAMETER_NAME_2
- SUPPLIER_2_PARAMETER_NAME_1 Ki-nTree fetches the supplier parameters names and values, then matches them to InvenTree parameters using this file. For instance, if you search a Digi-Key capacitor, those are the Digi-Key names for parameters: Capacitance, Tolerance, Package / Case, Voltage - Rated, etc. So this file unifies the parameter naming across all suppliers/distributors so that, in InvenTree, you can use the parametric table to find the right part and not crumble under duplicate parameters (eg. one capacitor would have "Voltage Rated" for parameter while the others have "Rated Voltage", when they are the same). The config file I made for this repo are meant to be tweaked and modified according to your own preferences 😉 |
BTW I found another issue with upgrading InvenTree python API to Maybe I'll have time to look into it myself in the coming days. |
Thank you for the explanation of the supplier_parameters.yaml! This makes a lot of sense. Maybe it would be a good idea to add this to the README usage instructions since they imply (at least to me) that it's enough to change categories.yaml and run the setup script. I could make a PR but since the README is the first thing a user sees you probably want to change it as you see fit. Aside from that I tried out InvenTree 0.8.1 https://github.com/inventree/inventree-python/releases/tag/0.8.1 and there is still the same error if it needs to fetch parameters. I see you are already working on it here #98. Looking forward to when it's done, thanks for your work! |
I forgot I wanted to update the README, will keep this issue opened in the meantime as a reminder. |
I'm trying to create parts in invenTree from digikey. Unfortunately I get a crash during part creation, which leaves me with parts that are successfully created and have basic info like name, image, description and keywords but are missing any parameters, supplier information, etc.
Here's a log of a part creation:
It seems to fail when getting no or the wrong response while fetching parameter templates from invenTree.
Here's the log of the invenTree nginx proxy container:
https://pastebin.com/9Du8xfHh
I checked the last accessed URL (
GET /api/part/category/6/parameters/?fetch_parent=True
) in my browser and get a full response by the django API.Steps to reproduce
python3 -m kintree.setup_inventree
)Note that I get a few errors here during parameter creation, see below
Version information
Ki-nTree: 0.5.3
InvenTree-Version: 0.7.7
python version: 3.8.5
Errors during setup
The text was updated successfully, but these errors were encountered: