Comments (18)
Does anything happen? Pyfa crash? Or the window just not load?
from pyfa.
Nothing happens. No crash. Pyfa continues to function normally. Window just doesn't load.
from pyfa.
Try launching pyfa from console and see if it prints "Problems importing matplotlib; continuing without graphs" there when you open graph. If it does, i will explain how to get more detailed data on import crash.
from pyfa.
Opened cmd and ran pyfa. Only output was a blank line before I got the prompt back (and the pyfa window).
Pyfa runs as before (no graphs). I'm assuming this means matplotlib is at least loading on app start? so I have that going for me which is nice.
from pyfa.
Ran the exe from console? Is it possible to run it from source on python2? I also run Win7 and the latest version of Pyfa with no trouble with the DPS graph =(
from pyfa.
Oh! ♿ Ok! Installed python, everything listed in the readme, and managed to get python running from source...
The first attempt to open a graph produces: "Problems importing matplotlib; continuing without graphs"
Further attempts to open a graph produce:
Traceback (most recent call last):
File "C:\Program Files (x86)\pyfa\.\gui\mainFrame.py", line 542, in openGraphFrame
self.graphFrame.SetFocus()
File "wx\_core.pyo", line 9301, in SetFocus
TypeError: in method 'Window_SetFocus', expected argument 1 of type 'wxWindow *'
Note: (this was copied from the log file, see below, so the path is different than my copy of the source)
Also I noticed that error_log.txt and output_log.txt are not written until Pyfa is closed. So I tried running from the .exe again and after attempting to open a graph and then closing Pyfa these same errors are written to the logs.
from pyfa.
Do you have any other alternative installations of wxwidgets / wxpython?
This error should never happen if bundled versions are used, to my understanding.
from pyfa.
No. I've never installed them before just now to run pyfa from source, but of course the issue was present before that.
The bundled libraries are definitely present in the pyfa directory. I always unzip/copy+replace the entire pyfa directory when a new version comes out, so the version in the pyfa directory should be ok. Does pyfa not use those copies by default over libraries installed elsewhere?
What should be my next debug steps be?
from pyfa.
Well, if it fails to import the module for wahtever reason, it seems to still set self.graphFrame
to something. Then upon subsequent tries to open the window it fails because, well, it failed the first time and set self.graphFrame
to an incorrect value. That should be fixed.
As to why it's not importing in the first place... I have no idea. I'll try to look into it further. Can you do me a favor though? I'm interested in seeing what exactly self.graphFrame
is being set to after failing to import.
This is the block that's not working for you:
def openGraphFrame(self, event):
if not self.graphFrame:
self.graphFrame = GraphFrame(self)
if gui.graphFrame.enabled:
self.graphFrame.Show()
else:
self.graphFrame.SetFocus()
Since pyfa is setting self.graphFrame
upon failutre, it is no longer None
and thus will try to set focus to the non-existent window.
In the source files (not the bundled release), open gui/mainFrame.py
and find that block (towards the bottom). Right under def openGraphFrame(self, event):
, add print self.graphFrame
making sure that the indentation is correct.
That will print the contents of self.graphFrame
to the console. Then run from the console with python path/to/pyfa.py
. Let pyfa load, and then try to open the graph window. What pops up in the console? Try to open the window again and see what it's being set to. Document your steps and let us know. =)
from pyfa.
Ok updated mainFrame.py, new output on first attempt to graph
None
Problems importing matplotlib; continuing without graphs
as expected. Subsequent attempts to open the graph output:
<gui.graphFrame.GraphFrame; >
Traceback (most recent call last):
File "[irrelevant path]\Pyfa\gui\mainFrame.py", line 543, in open GraphFrame
self.graphFrame.SetFocus()
File "C:\Python27\lib\site-packages\wx2.8-msw-unicode\wx\_core.py", line 9304, in SetFocus
return _core_.Window_SetFocus(*args, **kwards)
TypeError: in method 'Window_SetFocus', expected argument 1 of type 'wxWindow *'
so it looks like it's setting it to <gui.graphFrame.GraphFrame; >
Other things I thought about printing (like the exception code in graphFrame.py didn't turn out well because I don't know what I'm doing. 😄
from pyfa.
Yeah, it's just setting it to the GraphFrame class. I figured as much. Lets try to print out the exception message. Right now it catches the exception, but just prints out "Problem importing yada yada"
In gui/graphFrame.py
, find the block with that error message:
except:
print "Problems importing matplotlib; continuing without graphs"
enabled = False
return
Replace with:
except Exception, e:
print e.__doc__
print e.message
return
(again, make sure indentation is correct)
That will let us know what exactly is failing. If it's a failure to find the module, then I have no idea how to fix that as it should be bundled.
from pyfa.
Ok! error is:
Import can't find module, or can't find name in module.
matplotlib requires dateutil
Traceback (most recent call last):
File "[irrelevant path]\pyfa\gui\mainFrame.py", line 541, in openGraphFrame
self.graphFrame.Show()
File "C:\python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 9143, in Show
return _core_.Window_Sohw(*args, **kargs)
TypeError: in method 'Window_Show', expected argument 1 of type 'wxWindow *'
looks like the traceback is from getting rid of enabled = False
, so pyfa attempts to Show() the window despite not loading mathplotlib or finishing init
so I need dateutil?
As expected, attempting to open a graph the 2nd time produces the same error as before since we only run init at creation of an instance.
from pyfa.
Yeah, it seems that, for whatever reason, dateutil
isn't loading for you. Weird.
Go ahead and add enabled = False
back to the exception catch block. Keep the code that prints exceptions because we want to see if it still has issues. Add import dateutil
to the other imports at the top of gui/graphFrame.py
and see if it works then
from pyfa.
I tried adding it at both the top and bottom of the stack of imports before the GraphFrame class begins in graphFrame.py. This caused Pyfa to not start at all. I get Traceback and ImportError: No module named dateutil
I used the github app to download this source, so I should have everything. Should there be a dateutils.py somewhere?
from pyfa.
Update: I found an installer for python-dateutils 2.2 for py2.7 and used it. Now I'm getting matplotlib requires pyparsing
. I'll see if I can find that also. Still puzzling.
from pyfa.
I just deleted my c:\program files (x86)\pyfa\ directory again and reinstalled using the exe. Graphs work. I've tried that before without success. Really puzzled, but I won't argue with victory.
Running pyfa from source still gives me the matplotlib requires pyparsing
error, but if you don't want to keep debugging that I understand.
Either way, thanks very much for your time helping me through this!
from pyfa.
wtf. Agree'd really weird.
The source pyfa runs off the python interpreter that you installed, whereas the bundled pyfa come with it's own python and all the python modules needed (which is why it was perplexing that it didn't work). They are separate, the interpreter that you installed requires you to manually install the dependencies.
Glad you got it working. Go ahead and close the issue please. o7
from pyfa.
I think it has something to do with python using obsolete .pycs (happens sometimes, to my knowledge, although it compares src & pyc using timestamp so this is unlikely to happen).
Glad that you sorted this.
from pyfa.
Related Issues (20)
- Colors in dark mode are still hard to read in MacOS (11.7.10) HOT 2
- Error and traceback when using Backup All Fittings HOT 1
- HTML Export Contains No Data HOT 2
- ImportError: libnotify.so.4: cannot open shared object file: No such file or directory HOT 5
- Error During Operation HOT 1
- Linux Image Symbol Missing wl_proxy_marshal_flags HOT 2
- Electronic Hardening - Effect is not simulated in Pyfa HOT 3
- Graph improvement: simulate defensive ewar in dps graph
- NotImplementedError python stacktrace upon app launch (Linux version) HOT 1
- Error while fetching ESI fittings
- Pyfa gives Gnosis 50% Mining drone bonus, in-game fitting does not. HOT 1
- No URL opening
- irreversibly disable MWD if toggled off
- Pyfa does not reopen fits on opening HOT 1
- ImportError in Debian GNU/Linux 11 (bullseye)
- copy to clipboard > ESF returns error HOT 2
- Dual monitor bug
- Double click in "Compare" mode resets column width
- Add button to search contracts for abyssal modules
- Lancer dreadnoughts still do not have a ship thumbnail
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyfa.