gtaylor / EVE-Market-Data-Uploader

A bare bones, cross-platform, console based EVE Online market data uploader.
MIT License
20 stars 5 forks source link

Crash while spawnin upload process on Windows 7 #7

Open marandus opened 11 years ago

marandus commented 11 years ago

I installed EMDU on Windows 7 x86_64 following the instructions on your GitHub page. It starts up fine but then crashes when it tries to spawn the upload process stating it cannot find the emdu_console module. I start EMDU using the following command (the Python directory is in my PATH): python C:\Python27\Scripts\emdu_console

Error message: 2013-06-19 23:50:04,265: Got scan_endpoint http://upload.eve-emdr.com/upload/ 2013-06-19 23:50:07,680: Spawning upload process. Traceback (most recent call last): Traceback (most recent call last): File "", line 1, in File "", line 1, in File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main prepare(preparation_data) File "C:\Python27\lib\multiprocessing\forking.py", line 489, in prepare prepare(preparation_data) File "C:\Python27\lib\multiprocessing\forking.py", line 489, in prepare file, path_name, etc = imp.find_module(main_name, dirs) ImportError: Nfile, path_name, etc = imp.find_module(main_name, dirs) o module named emdu_consoleImportError : No module named emdu_console

Specs: Windows 7 x86_64 Python 2.7.5 x86 Reverence 1.5.0 x86 for Python 2.7 SetupTools 0.7.4 Watchdog 0.6.0 for Python 2.7

gtaylor commented 11 years ago

I don't run under Windows myself, so I don't think I'll be much help here. I'll definitely accept a pull request if you are able to figure out what's going on, though.

hitchhiker54 commented 11 years ago

I've run into this same error and done some digging around. It appears to be a problem with multitasking under python on windows and pickling. I'm a little uncertain on these issues being a noob coder so hope this helps.

hitchhiker54 commented 11 years ago

Ok, well I don't know why it worked, but under Windows 7 I renamed emdu_console to emdu_console.py in the bin folder of -master and ran it, seems to be going just fine :)

marandus commented 11 years ago

The above seems to work with the file in the bin folder, but it does not work im you do the same to the emdu_console script which is installed in the Scripts directory of the Python install.

hitchhiker54 commented 11 years ago

Progress :) There seems to be a build error with the Windows package. Running either the full emdu_console.py or the package call version that's left in /scripts gives error

emdu_console.py run in python27/scripts gives error The file build\bdist.win32\egg\pkg_resources.py could not be opened

in 'Eric' debug mode.

As a further test I unpacked the egg and copied build folder into \Lib\site-packages

the 1k emdu_console.py package caller script still fails but the full 3k emdu_console.py from -master archive works fine again.

gtaylor commented 11 years ago

I'm not sure how to proceed with this one, as I live in Linux land 95% of the time. If you know of a way we can fix this without impacting the Linux/Mac OS users, I'm all ears.

hitchhiker54 commented 11 years ago

So... I spent some time this morning avoiding work and looking at this; nothing on stackoverflow seemed to be relevant to the issue. Occam's razor came to the fore and i killed my emdu install as generated by d/l master archive and running setup.py. I then reinstalled with :

pip install git+https://github.com/gtaylor/EVE-Market-Data-Uploader.git

ran python emdu_console - back to the 'module not found : emdu_console' - ok, so added .py to it in scripts et voila! It works! -performs a happy dance-

Basically Windows is a problem :( The simple solution I guess in this case is just to let M$ users know that they need to rename the file to /python27/scripts/emdu_console.py and install git command line to run from command console as an added requirement.

gtaylor commented 11 years ago

What happens if you add your Python scripts dir to your $PATH and run emdu_console as a normal command, ie: emdu_console instead of python emdu_console?

hitchhiker54 commented 11 years ago

C:\Users\Me>emdu_console 'emdu_console' is not recognized as an internal or external command, operable program or batch file.

Windows always needs a file extension of some sort to understand how to handle a file.

gtaylor commented 11 years ago

I think pip figured this out somehow. May be worth looking at how they do it. On Dec 2, 2013 12:40 PM, "hitchhiker54" notifications@github.com wrote:

C:\Users\Me>emdu_console 'emdu_console' is not recognized as an internal or external command, operable program or batch file.

Windows always needs a file extension of some sort to understand how to handle a file.

— Reply to this email directly or view it on GitHubhttps://github.com/gtaylor/EVE-Market-Data-Uploader/issues/7#issuecomment-29639515 .

hitchhiker54 commented 11 years ago

I've thrown up a red herring here :( When I reinstalled via 'pip install git+...' it just installed the source into site-packages instead of building an .egg file. The original issue has resumed.

The file left in /Scripts reads :

!C:\Python27\python.exe

EASY-INSTALL-SCRIPT: 'emdu==0.1','emdu_console'

requires = 'emdu==0.1' import pkg_resources pkg_resources.run_script('emdu==0.1', 'emdu_console')

All well and good, the emdu-1.0-py2.7.egg/EGG_INFO/scripts/emdu_console is there and starts to run. This is apparently also where it fails as the imp_findmodule etc errors come up. Running the full emdu_console from here fails as before as well. Somewhere the .egg bound library is forcing a reference to this .egg bound script and failing terribly?

hitchhiker54 commented 11 years ago

Ok to answer my own question :) I removed the emdu_console from the.egg including it's directory and again the same error no module emdu_console. A quick test with the .py extension worked this time though... so again I removed the extension - still working but only because emdu_console.pyc was still there; with no .pyc file the error returned again.

So we have a winner - however normally when I run a python script I don't get a .pyc file at all. Here my inexperience shows sadly as I'm mostly working this stuff out as it comes up.

hitchhiker54 commented 11 years ago

gtaylor - It's possible that something is forcing the import of emdu_console, and thus the .pyc file generation and the error on windows. Can you shed any light here for me? I couldn't see any direct import in the library code and removing it from the egg setup didn't help.

andrewpmartinez commented 9 years ago

Still an issue in Windows (specifically 8.1 w/ Python 2.7.9). Fix is still as mentioned above:

  1. Install via: pip install git+https://github.com/gtaylor/EVE-Market-Data-Uploader.git
  2. Rename emdu_console to emdu_console.py in the C:\Python27\Scripts\ directory
gtaylor commented 9 years ago

I am debating whether to spend the time fixing this, now that we have the CREST market API.

Thoughts?

andrewpmartinez commented 9 years ago

I was poking around CREST just now and I didn't see a way to get actual market buy/sell orders. Just aggregated "adjustedPrice".

If CREST gets to the point where you can see buy/sell orders then Eve Market Data Uploader becomes obsolete. Right now, there are use case that are not covered; some listed here:

  1. Determining supply demand at specific stations/regions
  2. Determining profitable hauling ventures
  3. Finding reasonable buy low/sell high deals
gtaylor commented 9 years ago

It's been a while since I've looked, but I think the market orders are only on SiSi right now. We've got people working on some software to feed EMDR from these APIs, but I haven't been super involved with it.

andrewpmartinez commented 9 years ago

I can't check SISI. I only just started playing eve a few weeks ago and apparently my credentials do not work for SISI (i.e. I wasn't in the system w/ the mirror was taken)

hitchhiker54 commented 9 years ago

you'll have to wait till the next time the devs copy chars over. It doesn't happen very often as I recall, but I've been on a hiatus for a while from eve.

On Mon, Feb 23, 2015 at 8:26 PM, Andrew Martinez notifications@github.com wrote:

I can't check SISI. I only just started playing eve a few weeks ago and apparently my credentials do not work for SISI.

— Reply to this email directly or view it on GitHub https://github.com/gtaylor/EVE-Market-Data-Uploader/issues/7#issuecomment-75624608 .