Skip to content
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

No ship stat window #458

Closed
thorr18 opened this issue Dec 1, 2015 · 6 comments
Closed

No ship stat window #458

thorr18 opened this issue Dec 1, 2015 · 6 comments

Comments

@thorr18
Copy link

thorr18 commented Dec 1, 2015

Each time I right click in a blank area and select 'Ship Stats', I do not get a ship stat window.
I see a traceback each time I select it.

BsMBP:tests bem$ ../dloadedBuilds/pyfa-preRelease.app/Contents/MacOS/pyfa -d
Nov 30 19:14:57  pyfa[7969] <Notice>: 2015-11-30 19:14:57,327 root                     INFO     Starting pyfa
Nov 30 19:15:00  pyfa[7969] <Notice>: 2015-11-30 19:15:00,235 service.fit              DEBUG    ==========recalc==========
Nov 30 19:15:00  pyfa[7969] <Notice>: 2015-11-30 19:15:00,387 eos.saveddata.fit        DEBUG    Starting fit calculation on: Fit(ID=47, ship=Phantasm, name=Phantasm fit) at 0x1103032d0, withBoosters: True
Nov 30 19:15:00  pyfa[7969] <Notice>: 2015-11-30 19:15:00,411 eos.saveddata.fit        DEBUG    Timer - Fit: 47, Phantasm fit - Done with runtime: early - 24.47ms (24.47ms elapsed)
Nov 30 19:15:00  pyfa[7969] <Notice>: 2015-11-30 19:15:00,457 eos.saveddata.fit        DEBUG    Timer - Fit: 47, Phantasm fit - Done with runtime: normal - 45.41ms (69.89ms elapsed)
Nov 30 19:15:00  pyfa[7969] <Notice>: 2015-11-30 19:15:00,462 eos.saveddata.fit        DEBUG    Timer - Fit: 47, Phantasm fit - Done with runtime: late - 4.96ms (74.86ms elapsed)
Nov 30 19:15:00  pyfa[7969] <Notice>: 2015-11-30 19:15:00,462 eos.saveddata.fit        DEBUG    Timer - Fit: 47, Phantasm fit - Done with fit calculation - 0.12ms (74.99ms elapsed)
Nov 30 19:15:00  pyfa[7969] <Notice>: 2015-11-30 19:15:00,471 service.fit              DEBUG    ==========recalc==========
Nov 30 19:15:00  pyfa[7969] <Notice>: 2015-11-30 19:15:00,472 eos.saveddata.fit        DEBUG    Starting fit calculation on: Fit(ID=47, ship=Phantasm, name=Phantasm fit) at 0x1103032d0, withBoosters: True
Nov 30 19:15:00  pyfa[7969] <Notice>: 2015-11-30 19:15:00,491 eos.saveddata.fit        DEBUG    Timer - Fit: 47, Phantasm fit - Done with runtime: early - 19.68ms (19.68ms elapsed)
Nov 30 19:15:00  pyfa[7969] <Notice>: 2015-11-30 19:15:00,527 eos.saveddata.fit        DEBUG    Timer - Fit: 47, Phantasm fit - Done with runtime: normal - 35.98ms (55.68ms elapsed)
Nov 30 19:15:00  pyfa[7969] <Notice>: 2015-11-30 19:15:00,529 eos.saveddata.fit        DEBUG    Timer - Fit: 47, Phantasm fit - Done with runtime: late - 2.03ms (57.72ms elapsed)
Nov 30 19:15:00  pyfa[7969] <Notice>: 2015-11-30 19:15:00,530 eos.saveddata.fit        DEBUG    Timer - Fit: 47, Phantasm fit - Done with fit calculation - 0.17ms (57.90ms elapsed)
Nov 30 19:15:07  pyfa[7969] <Notice>: Traceback (most recent call last):
Nov 30 19:15:07  pyfa[7969] <Notice>:   File "/Users/bem/factory/Py/Pyfa/build/dloadedBuilds/pyfa-preRelease.app/Contents/Resources/lib/python2.7/site-packages.zip/gui/contextMenu.py", line 124, in handler
Nov 30 19:15:07  pyfa[7969] <Notice>:   File "/Users/bem/factory/Py/Pyfa/build/dloadedBuilds/pyfa-preRelease.app/Contents/Resources/lib/python2.7/site-packages.zip/gui/builtinContextMenus/itemStats.py", line 58, in activate
Nov 30 19:15:07  pyfa[7969] <Notice>:   File "/Users/bem/factory/Py/Pyfa/build/dloadedBuilds/pyfa-preRelease.app/Contents/Resources/lib/python2.7/site-packages.zip/gui/itemStats.py", line 92, in __init__
Nov 30 19:15:07  pyfa[7969] <Notice>:   File "/Users/bem/factory/Py/Pyfa/build/dloadedBuilds/pyfa-preRelease.app/Contents/Resources/lib/python2.7/site-packages.zip/gui/itemStats.py", line 175, in __init__
Nov 30 19:15:07  pyfa[7969] <Notice>:   File "/Users/bem/factory/Py/Pyfa/build/dloadedBuilds/pyfa-preRelease.app/Contents/Resources/lib/python2.7/site-packages.zip/gui/itemStats.py", line 597, in __init__
Nov 30 19:15:07  pyfa[7969] <Notice>:   File "/Users/bem/factory/Py/Pyfa/build/dloadedBuilds/pyfa-preRelease.app/Contents/Resources/lib/python2.7/site-packages.zip/gui/itemStats.py", line 683, in PopulateTree
Nov 30 19:15:07  pyfa[7969] <Notice>:   File "/Users/bem/factory/Py/Pyfa/build/dloadedBuilds/pyfa-preRelease.app/Contents/Resources/lib/python2.7/site-packages.zip/gui/itemStats.py", line 954, in buildModuleView
Nov 30 19:15:07  pyfa[7969] <Notice>: TypeError: a float is required
Nov 30 19:23:34  pyfa[7969] <Notice>: 2015-11-30 19:23:34,326 service.fit              DEBUG    ==========recalc==========
Nov 30 19:23:34  pyfa[7969] <Notice>: 2015-11-30 19:23:34,327 eos.saveddata.fit        DEBUG    Starting fit calculation on: Fit(ID=47, ship=Phantasm, name=Phantasm fit) at 0x1103032d0, withBoosters: True
Nov 30 19:23:34  pyfa[7969] <Notice>: 2015-11-30 19:23:34,329 eos.saveddata.fit        DEBUG    Timer - Fit: 47, Phantasm fit - Done with runtime: early - 2.11ms (2.11ms elapsed)
Nov 30 19:23:34  pyfa[7969] <Notice>: 2015-11-30 19:23:34,341 eos.saveddata.fit        DEBUG    Timer - Fit: 47, Phantasm fit - Done with runtime: normal - 11.77ms (13.90ms elapsed)
Nov 30 19:23:34  pyfa[7969] <Notice>: 2015-11-30 19:23:34,342 eos.saveddata.fit        DEBUG    Timer - Fit: 47, Phantasm fit - Done with runtime: late - 0.81ms (14.71ms elapsed)
Nov 30 19:23:34  pyfa[7969] <Notice>: 2015-11-30 19:23:34,342 eos.saveddata.fit        DEBUG    Timer - Fit: 47, Phantasm fit - Done with fit calculation - 0.12ms (14.84ms elapsed)
Nov 30 19:24:55  pyfa[7969] <Notice>: Traceback (most recent call last):
Nov 30 19:24:55  pyfa[7969] <Notice>:   File "/Users/bem/factory/Py/Pyfa/build/dloadedBuilds/pyfa-preRelease.app/Contents/Resources/lib/python2.7/site-packages.zip/gui/contextMenu.py", line 124, in handler
Nov 30 19:24:55  pyfa[7969] <Notice>:   File "/Users/bem/factory/Py/Pyfa/build/dloadedBuilds/pyfa-preRelease.app/Contents/Resources/lib/python2.7/site-packages.zip/gui/builtinContextMenus/itemStats.py", line 58, in activate
Nov 30 19:24:55  pyfa[7969] <Notice>:   File "/Users/bem/factory/Py/Pyfa/build/dloadedBuilds/pyfa-preRelease.app/Contents/Resources/lib/python2.7/site-packages.zip/gui/itemStats.py", line 92, in __init__
Nov 30 19:24:55  pyfa[7969] <Notice>:   File "/Users/bem/factory/Py/Pyfa/build/dloadedBuilds/pyfa-preRelease.app/Contents/Resources/lib/python2.7/site-packages.zip/gui/itemStats.py", line 175, in __init__
Nov 30 19:24:55  pyfa[7969] <Notice>:   File "/Users/bem/factory/Py/Pyfa/build/dloadedBuilds/pyfa-preRelease.app/Contents/Resources/lib/python2.7/site-packages.zip/gui/itemStats.py", line 597, in __init__
Nov 30 19:24:55  pyfa[7969] <Notice>:   File "/Users/bem/factory/Py/Pyfa/build/dloadedBuilds/pyfa-preRelease.app/Contents/Resources/lib/python2.7/site-packages.zip/gui/itemStats.py", line 683, in PopulateTree
Nov 30 19:24:55  pyfa[7969] <Notice>:   File "/Users/bem/factory/Py/Pyfa/build/dloadedBuilds/pyfa-preRelease.app/Contents/Resources/lib/python2.7/site-packages.zip/gui/itemStats.py", line 954, in buildModuleView
Nov 30 19:24:55  pyfa[7969] <Notice>: TypeError: a float is required

1.16.3 prerelease , OSX 10.11.1

@blitzmann
Copy link
Collaborator

I cannot reproduce on 10.10.5 and current pyfa prerelease. I opened a fit then right clicked the ship stats, opened just fine.

The error comes from the buildModuleView function which is part of the affected by tab, and it's saying that a float that it is expecting is not there. I don't see how this would happen.

The traceback you gave will definitely be helpful, but while I'm working on that, answer this: is this a completely blank fit? Does it have any modules? Are you using all 5 character? Does it happen with all fits, or just a particular one? Does it work if you right click on a module and select ship stats? How about and empty module slot?

Are you running with attribute overrides?

@blitzmann
Copy link
Collaborator

Additionally, could you do that following:

Navigate to pyfa.app/Contents/Resources/lib/python2.7/ and you should see a zipfile called site-packages.zip. Double click it to extract it to that directory, and then rename site-packages.zip to something else. Now navigate to and open site-packages/gui/itemStats.py

Find this block on line 947:

                    for attr in attrSorted:
                        attrName, displayName, attrModifier, attrAmount, penalized, attrIcon = attr

Immediately under that, add the following:

                        print itemName, attrName, displayName, attrModifier, attrAmount, type(attrAmount)

Make sure the indentation is correct (use spaces, not tabs). Then run pyfa with pyfa.app/Contents/MacOS/pyfa -d and reproduce the problem. That will give me a little more information on what exactly is happening here.

The fix really should be easy enough - simply force the attribute to be float for GUI purposes. But I'd like to know which item is causing this problem, as technically all attribute values are supposed to be floats

@thorr18
Copy link
Author

thorr18 commented Dec 2, 2015

Script extracts the files, inserts your logging statement as line 949, and runs the modified Pyfa:

#testWithExtraLogging.sh

testPackage="../dloadedBuilds/pyfa-preRelease.app"
open -W $testPackage/Contents/Resources/lib/python2.7/site-packages.zip
mv $testPackage/Contents/Resources/lib/python2.7/site-packages.zip $testPackage/Contents/Resources/lib/python2.7/site-packages.BU
sed -i.bak '949i\
\                        print itemName, attrName, displayName, attrModifier, attrAmount, type(attrAmount)
' $testPackage/Contents/Resources/lib/python2.7/site-packages/gui/itemStats.py

rm ~/.pyfa/log.txt
open -W $testPackage --args -d
mv ~/.pyfa/log.txt testShipStatWindow.log
cat testShipStatWindow.log

Tested three fits in this log.

  • First was a blank fit. Ship stat popup succeeded.
  • Next was apparently a bad fit. Did not get a traceback, but stat window won't popup.
  • Last was a fit full of modules. Ship stat popup succeeded.

Attached:
testShipStatWindow.log.txt

@thorr18
Copy link
Author

thorr18 commented Dec 2, 2015

Here is what the bad fit looks like. I think I have other bad ones too. Don't remember if there is supposed to be a module in that empty spot. Maybe Pyfa deleted that module. You mentioned in #447 that this would create a log entry I could back and look for. I might have it saved. I probably saved an old user db also before opening with preRelease.
fitthatwontpopupshipstats

@blitzmann
Copy link
Collaborator

That second fit:

2015-12-02 06:16:53,312 STDOUT                   INFO     Capacitor Flux Coil II
2015-12-02 06:16:53,312 STDOUT                   INFO     powerOutput
2015-12-02 06:16:53,312 STDOUT                   INFO     Powergrid Output
2015-12-02 06:16:53,312 STDOUT                   INFO     *
2015-12-02 06:16:53,312 STDOUT                   INFO     None
2015-12-02 06:16:53,312 STDOUT                   INFO     <type 'NoneType'>

I am almost positive that this is related to #397, I'll need to check on it later. Basically CCP removed some redundant attributes from Flux coils, but they still have effects that try to use these attributes. I don't remember if there was a reason for me to not delete the effect files (probably some other items use it or something). The None returns since the attribute doesn't exist, but I guess I accidentally forgot to exclude it from the affectors list

@blitzmann
Copy link
Collaborator

Yep, that was it. Fixed in repo, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants