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

Error on opening fit and on new fit #1291

Closed
GoNINzo opened this issue Sep 20, 2017 · 11 comments
Closed

Error on opening fit and on new fit #1291

GoNINzo opened this issue Sep 20, 2017 · 11 comments
Labels
bug Confirmed to be a bug fixed This issue has been fixed! Oh joy!

Comments

@GoNINzo
Copy link

GoNINzo commented Sep 20, 2017

Bug Report

This is a bug. I attempted to open an impel fit, pasted below. It throws an error, pasted below. When I try to make a new fit, it throws an error. I can open other ships I tested, like an occator. The program is semi-usable afterwards.

I have pasted a screen shot as well here: https://imgur.com/a/NbEaR

Expected behavior: Open a new fit, or an old fit.

Actual behavior: Application error with this error message:

OS version: Windows-8-6.2.9200
Python: 2.7.10
wxPython: 3.0.2.0
SQLAlchemy: 1.0.5
Logbook: 1.0.0
pyfa version: 1.31.0 Stable - YC119.8 1.0
pyfa root: D:\Apps\pyfa
save path: C:\Users\gonzo.pyfa
fs encoding: mbcs

EXCEPTION: unsupported operand type(s) for +=: 'int' and 'NoneType'

File "D:\Apps\pyfa\library.zip\gui\statsPane.py", line 75, in fitChanged
view.refreshPanel(fit)
File "D:\Apps\pyfa\library.zip\gui\builtinStatsViews\priceViewFull.py", line 90, in refreshPanel
self.refreshPanelPrices(fit)
File "D:\Apps\pyfa\library.zip\gui\builtinStatsViews\priceViewFull.py", line 134, in refreshPanelPrices
total_price += ship_price

Detailed steps to reproduce:

  1. Load faction tank fit as below:

  2. Start new Impel fit?

  3. Throws error.

Fits involved in EFT format (Edit > To Clipboard > EFT):

Empty fit
12753::
Faction tank one that might be causing the problem
12753:20351;1:2048;1:15030;1:15078;1:15062;1:15046;1:15455;1:14767;2:31059;2::

Release or development git branch? Please note the release version or commit hash:

Release: 1.31.0 Stable YC119.8 1.0

Operating system and version (eg: Windows 10, OS X 10.9, OS X 10.11, Ubuntu 16.10):

Windows 10 64-bit

Other relevant information:

I have pasted a screen shot as well here: https://imgur.com/a/NbEaR

(Thanks for all your fine fine work.)

@blitzmann
Copy link
Collaborator

Can you post your log files found in %userprofile%/.pyfa/? It looks like the ship price was never fetched and returned None, but I'm not sure why (I believe it should always return at least 0)

@blitzmann
Copy link
Collaborator

Also, is it only this one hull that is causing issues?

@blitzmann
Copy link
Collaborator

blitzmann commented Sep 21, 2017

I was able to reproduce by setting a price in the database to NULL, which shouldn't really happen. When that price loads for the item and is None, this error happens. I'll look into why this may be happening, and possibly setting a default value of 0.

It would still be really helpful to have those logs if you can provide them :)

@GoNINzo
Copy link
Author

GoNINzo commented Sep 21, 2017

Pyfa-2017-09-21.log.txt
Sorry, just checked this thread. I don't see anything weird in it other than this:
[2017-09-21 15:52:05.924000] INFO: eos.saveddata.fit: Fit is not yet calculated; will be running local calcs for Fit(ID=1207, ship=Impel, name=Impel fit) at 0x5b686f0

the old log was 2 meg, this one is only 1284k.

realize this is an empty fit.

@GoNINzo
Copy link
Author

GoNINzo commented Sep 21, 2017

I tried about a dozen other hulls, all were fine. But it also happened with a bustard. Occator and Mastadon are fine. All other industrials are fine.

OS version: Windows-8-6.2.9200
Python: 2.7.10
wxPython: 3.0.2.0
SQLAlchemy: 1.0.5
Logbook: 1.0.0
pyfa version: 1.31.0 Stable - YC119.8 1.0
pyfa root: D:\Apps\pyfa
save path: C:\Users\gonzo.pyfa
fs encoding: mbcs

EXCEPTION: unsupported operand type(s) for +=: 'int' and 'NoneType'

File "D:\Apps\pyfa\library.zip\gui\statsPane.py", line 75, in fitChanged
view.refreshPanel(fit)
File "D:\Apps\pyfa\library.zip\gui\builtinStatsViews\priceViewFull.py", line 90, in refreshPanel
self.refreshPanelPrices(fit)
File "D:\Apps\pyfa\library.zip\gui\builtinStatsViews\priceViewFull.py", line 134, in refreshPanelPrices
total_price += ship_price

@blitzmann
Copy link
Collaborator

Can you send me your saveddata.db file from %userprofile%/.pyfa to [email protected]? it will allow me to see exactly what is in your fitting database as it relates to prices. eve-central is down at the moment, so that very well may have something to do with it (can't get data, sticking null into prices table).

I have a fix that I'm working on and testing.

@GoNINzo
Copy link
Author

GoNINzo commented Sep 21, 2017

I did export of all fittings (1,196 of them!) to see if I could see anything in common with the fits associated. Here is the single Bustard fit I have in there.

<fitting name="Tank Hauler">
	<description value=""/>
	<shipType value="Bustard"/>
	<hardware slot="low slot 0" type="Expanded Cargohold II"/>
	<hardware slot="low slot 1" type="Expanded Cargohold II"/>
	<hardware slot="low slot 2" type="Expanded Cargohold II"/>
	<hardware slot="med slot 0" type="50MN Cold-Gas Enduring Microwarpdrive"/>
	<hardware slot="hi slot 0" type="Improved Cloaking Device II"/>
	<hardware slot="rig slot 0" type="Medium Cargohold Optimization I"/>
	<hardware slot="rig slot 1" type="Medium Cargohold Optimization I"/>
</fitting>

I had some weirder ones with the impel (99.98% resists across the board anyone?) but no unknown items.

I copied this fit to the prowler, different class, but all the same values, no problems, so it has to be a null value on the ship?

Let me know if you want me to adjust priceViewFull.py in any way to try to figure out which item is Null now?

@blitzmann
Copy link
Collaborator

blitzmann commented Sep 21, 2017

A fitting export isn't going to help unfortunately. The problem lies with the price that is coming back for the ship item

total_price += ship_price: ship_price is None (the equivalent to the databases NULL). for whatever reason, you have a NULL price on some of your ship items in the database. But it's very odd, since you are stating, for example, some impels work and some don't, but the the price is per item, so if one impel doesn't work, they should all not work.

So best troubleshooting would be to get your saveddata.db if you can send it over via email (don't upload it here - it contains your characters API information) so that I can peak and see which items have null values and which don't, and try to dissect why it sometimes works.

As for the fix, the current working thought it to always return a float fore the price, regardless of if price is NULL in the database. That should fix the issue from manifesting, but still want to delve into why it started in the first place :)

@GoNINzo
Copy link
Author

GoNINzo commented Sep 21, 2017

Yeah, mailed you the db, let me know if you want anything else on this. Thanks!

@blitzmann
Copy link
Collaborator

Yeah, mailed you the db, let me know if you want anything else on this. Thanks!

Thanks!

@blitzmann blitzmann added the fixed This issue has been fixed! Oh joy! label Sep 23, 2017
@blitzmann
Copy link
Collaborator

This should be fixed in master branch - still not sure what caused the NULL values in the database, although it probably has to do with eve central being down (I've got a working branch that allows you to select eve market data instead now to alleviate website being down issues). Planning on release tonight or tomorrow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed to be a bug fixed This issue has been fixed! Oh joy!
Projects
None yet
Development

No branches or pull requests

2 participants