Skip to content

Pyfa throws error when trying to view Market Group for Implant. #1828

Closed

Description

@GKFC

Searching for the Genolution 'Auroral' AU-79 is fine. So is adding it to a fit.

However, it'll cause an error to then right-click -> Implant Market Group in the actual fit itself. Not sure if it's for any other implants too.

Cheers,

G.

Activity

  1. blitzmann commented on Dec 20, 2018

    @blitzmann
    Collaborator

    Thanks for the bug report! Will take a look at this this weekend

  2. blitzmann commented on Dec 24, 2018

    @blitzmann
    Collaborator

    Looks like this is due to the market group for these implants not being in the tree. And this is due to the fact that we restrict the market groups available in pyfa, so that we don't clutter up the tree with shit that doesn't pertain (like blueprints). I'll take a further look at options available to remedy this for these special edition implants

  3. blitzmann commented on Dec 24, 2018

    @blitzmann
    Collaborator

    Taking a look at this market group, it looks like this implant is the only one of it's kind.

    image

    There's a few ways to fix this:

    • Allow the Special Edition Assets root. This will also bring in all the other crap we don't need, so I'd rather not do this.
    • Move the Special Edition Implants to the Implant market group. We can do this, however would take a bit of work to re-assign the parent root directory to one of our choosing. I'm not sure if we already have code that does this or if it's going to be completely new (I know we have code to reassign specific modules to new markets groups, but unsure abut reassigning groups themselves).
    • Disallow the option to "Go to Market Group" for those that don't have a whitelisted root market group. This would work for this situation because the implant is the only one in the group. However, if there's ever more than one, then we wouldn't be able to utilize that feature to show similar implants

    I can have a look at 2 to see how difficult it might be, but 3) sounds like a good idea regardless and would fix this error happening in the future if there's ever modules around that don't have a root market group. @DarkFenX do you have any thoughts on how best to deal with this?

  4. DarkFenX commented on Dec 27, 2018

    @DarkFenX
    Member

    I see two ways to implement generic 'safety mechanism':

    1. Hide this menu for items which have no visible market root. Most likely it would require building whole tree and keeping it in memory (as set of marketGroupIDs) to have this check readily available w/o huge database queries, or removing market groups which are not visible from within pyfa during database build time (so we'd have to specify market roots in db build script). If such items have no market group, context menu handling would be simple (i think it's already coded to not show market group menu for such items)
    2. Hide items which are not available via pyfa market trees in search. Would also some additional data processing and it would hide stuff which is useful for planning cargo layout (e.g. mobile depots), so would also require additional market groups to be shown.

    I'd go with 1).

    As for this specific item - could be left as-is (should work just fine with safety mechanism implemented), moved to some existing market group (via market override, self.ITEMS_FORCEDMARKETGROUP in service) or forced to be unpublished. I don't know what kind of purpose does it serve in pyfa so up to you to decide.

  5. blitzmann commented on Jan 2, 2019

    @blitzmann
    Collaborator

    Hide this menu for items which have no visible market root. Most likely it would require building whole tree and keeping it in memory (as set of marketGroupIDs) to have this check readily available w/o huge database queries, or removing market groups which are not visible from within pyfa during database build time (so we'd have to specify market roots in db build script). If such items have no market group, context menu handling would be simple (i think it's already coded to not show market group menu for such items)

    I'm of the same opinion. I think, for now, it might be preferable to pre-calc the root market group item for the various groups so that we have easy access to it without having to do various lookups or caches. This could be an additional column in the market group table, and calc'd during database build.

    Eventually, I would like to move all the logic of what's accessible / overridden in pyfa from the market service to the database creation. I think there's already an issue to look into that; it should smooth out some of the complexities in the market service when it comes to various publicity checks and whatnot. But that's a bigger task for another time :)

  6. DarkFenX commented on Apr 8, 2019

    @DarkFenX
    Member

    Fixed in 211a83d

  7. added
    fixedThis issue has been fixed! Oh joy!
    on Apr 8, 2019
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

    bugConfirmed to be a bugfixedThis issue has been fixed! Oh joy!

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions