No internet connection
  1. Home
  2. Bug Reports

Unpack Immature Packages

By Joey Espinoza @joey
    2023-07-14 16:38:38.259Z

    Lets say I have 3 packages of OG with various quantities. When I go to unpack using T3 and select all 3 at the same time, T3 will take the total of all 3 packages and pull from only one of the 3 meaning 2 are untouched (no quantity change) and the first one becomes negative in metrc.

    Solved in post #9, click to view
    • 7 replies
    1. M
      Matt Frisbie @mattfriz
        2023-07-15 16:13:30.377Z

        Hey Joey, just want to confirm I'm replicating this as you're describing. (I'm using the Metrc testing sandbox, but it should work the same).

        Start with 3 packages of clones with various quantities:

        Unpack everything:

        When I submit, I'm checking the output, and I see 5 packages all with expected quantities:

        Does this match your process?

        1. J
          In reply tojoey:
          Joey Espinoza @joey
            2023-07-16 01:30:55.690Z

            Yes I unpacked 3 packages. The output is correct, it created immature batches but the way it created the output was incorrect. Package #1 was overpulled by 868 plants which was the exact sum of Package #2 & #3. I was left with immature lots with correct quantities but the plants in Package #2 & #3 were untouched.

            1. J
              In reply tojoey:
              Joey Espinoza @joey
                2023-07-18 04:37:46.834Z

                effecting split packages as well

                1. M
                  In reply tojoey:
                  Matt Frisbie @mattfriz
                    2023-07-18 15:53:06.381Z

                    Sent you an email.

                    1. M
                      In reply tojoey:
                      Matt Frisbie @mattfriz
                        2023-08-15 00:00:15.946Z

                        I think I've narrowed it down. When calculating how many plants to allocate to each package, there's special behavior when it detects that the immature plant packages are weight based (determined as shown below). T3 needs to know how many things it can unpack from a single package, so that's why it checks for count-based. When the package is weight-based, it doesn't know how many things there are to unpack, so it just shoves it all into one package. The assumption here was that a user might be trying to unpack 20 grams of seeds or something like that, and would just have one package to deal with.

                        I didn't expect this condition to ever be hit, as seeds and clones to my knowledge are always count-based packages. However, the bug as described matches how the weight-based unpack is designed to work, so my best guess is that something about the packages is triggering the weight-based unpack logic to execute instead.

                        I'm making two changes:

                        • Changing how it detects count-based to something that might be a little bit more reliable
                        • Disabling weight-based unpack entirely

                        The tool will stop working in the cases where clients are encountering the bug. When this happens, we can take a very close look at the details of the packages that are causing the issues and take it from there.

                        1. M
                          In reply tojoey:
                          Matt Frisbie @mattfriz
                            2023-08-15 21:26:09.810Z

                            I'm starting to think this isn't a T3 bug, this is a Metrc server bug. Submitting multiple plantings from the same package simultaneously seems like it's getting screwed up on Metrc's end. Metrc's forms disallow duplicate source packages together, indicating they know this can be a problem. (screenshot)

                            T3 submits a handful at a time to complete more quickly, but I'm going to change this to only submit one at a time. It'll be slower, but it will only create one plant batch at a time, wait for it to finish, before going to the next one. This won't give Metrc's servers a chance to select the wrong package.

                            I'll apply this to any other T3 package tools too that might be subject to this problem.

                            1. Progress
                              with handling this problem
                            2. M@mattfriz marked this topic as Planned 2023-07-18 15:58:59.053Z.