You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pyfa throws error when trying to view Market Group for Implant. #1828
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
Taking a look at this market group, it looks like this implant is the only one of it's kind.
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?
I see two ways to implement generic 'safety mechanism':
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)
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.
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 :)
Activity
blitzmann commentedon Dec 20, 2018
Thanks for the bug report! Will take a look at this this weekend
blitzmann commentedon Dec 24, 2018
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
blitzmann commentedon Dec 24, 2018
Taking a look at this market group, it looks like this implant is the only one of it's kind.
There's a few ways to fix this:
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?
DarkFenX commentedon Dec 27, 2018
I see two ways to implement generic 'safety mechanism':
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_FORCEDMARKETGROUPin 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.blitzmann commentedon Jan 2, 2019
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 :)
DarkFenX commentedon Apr 8, 2019
Fixed in 211a83d