Page 3 of 154 FirstFirst 123456713 ... LastLast
Results 31 to 45 of 2309

Thread: TradeDangerous: power-user trade optimizer

  1. #31
    Might be a good idea to link directly to where we can download the required packages for anyone not familiar with them.


    Is it "Microsoft Access Database Engine 2010 Redistributable" that I need for "Microsoft Access 2010+ drivers"?

    Searching "Microsoft Access 2010+ drivers" brought up all kinds of results including CNET (likely malware/spyware infested) sponsored downloads.

    The other 2 were straight forward to locate though.

    Thanks for your effort.

    *EDIT* Ah well, guess this is not for me. I can't make head nor tail of it (as in, I don't even know how to get anything to load or what to do with the downloaded files).

    An Android app would be very handy, with a simple search function for trade routes and what is most profitable for any given route.

  2. #32
    Hi Mate,

    This is really usefull. Thank you for taking your time out to create something like this for us traders.

    I was wondering if you can help me with an error im getting with getting x52 pro MFD working.

    I'm getting the following error:

    Traceback (most recent call last):
    File "F:\Downloads\Trade Dangerous\saitek\DirectOutput.py", line 307, in __init__
    self.direct_output = DirectOutput(dll_path)
    File "F:\Downloads\Trade Dangerous\saitek\DirectOutput.py", line 99, in __init__
    self.DirectOutputDLL = ctypes.WinDLL(dll_path)
    File "F:\Program Files (x86)\Python\lib\ctypes\__init__.py", line 351, in __init__
    self._handle = _dlopen(self._name, mode)
    OSError: [WinError 193] %1 is not a valid Win32 application

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "F:\Downloads\Trade Dangerous\trade.py", line 77, in __init__
    self.doObj = saitek.X52Pro.SaitekX52Pro()
    File "F:\Downloads\Trade Dangerous\saitek\DirectOutput.py", line 309, in __init__
    raise DLLError(e.winerror)
    saitek.DirectOutput.DLLError: Unable to load DirectOutput.dll - possible 32/64 bit mismatch between Python interpreter and DLL

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "F:\Downloads\Trade Dangerous\trade.py", line 382, in <module>
    main()
    File "F:\Downloads\Trade Dangerous\trade.py", line 329, in main
    parse_command_line()
    File "F:\Downloads\Trade Dangerous\trade.py", line 247, in parse_command_line
    mfd = X52ProMFD()
    File "F:\Downloads\Trade Dangerous\trade.py", line 79, in __init__
    raise Exception('Unable to initialize the X52 Pro module. Make sure your X52 is plugged in and you have the drivers installed.')
    Exception: Unable to initialize the X52 Pro module. Make sure your X52 is plugged in and you have the drivers installed.

    I can confirm the X52 is plugged in and it is working on Elite. Any help is greatly appreciated.

    Thanks,
    Hondo

  3. #33
    Originally Posted by Hondo View Post (Source)
    Hi Mate,

    This is really usefull. Thank you for taking your time out to create something like this for us traders.

    I was wondering if you can help me with an error im getting with getting x52 pro MFD working.

    I'm getting the following error:

    Traceback (most recent call last):
    File "F:\Downloads\Trade Dangerous\saitek\DirectOutput.py", line 307, in __init__
    self.direct_output = DirectOutput(dll_path)
    File "F:\Downloads\Trade Dangerous\saitek\DirectOutput.py", line 99, in __init__
    self.DirectOutputDLL = ctypes.WinDLL(dll_path)
    File "F:\Program Files (x86)\Python\lib\ctypes\__init__.py", line 351, in __init__
    self._handle = _dlopen(self._name, mode)
    OSError: [WinError 193] %1 is not a valid Win32 application

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "F:\Downloads\Trade Dangerous\trade.py", line 77, in __init__
    self.doObj = saitek.X52Pro.SaitekX52Pro()
    File "F:\Downloads\Trade Dangerous\saitek\DirectOutput.py", line 309, in __init__
    raise DLLError(e.winerror)
    saitek.DirectOutput.DLLError: Unable to load DirectOutput.dll - possible 32/64 bit mismatch between Python interpreter and DLL

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "F:\Downloads\Trade Dangerous\trade.py", line 382, in <module>
    main()
    File "F:\Downloads\Trade Dangerous\trade.py", line 329, in main
    parse_command_line()
    File "F:\Downloads\Trade Dangerous\trade.py", line 247, in parse_command_line
    mfd = X52ProMFD()
    File "F:\Downloads\Trade Dangerous\trade.py", line 79, in __init__
    raise Exception('Unable to initialize the X52 Pro module. Make sure your X52 is plugged in and you have the drivers installed.')
    Exception: Unable to initialize the X52 Pro module. Make sure your X52 is plugged in and you have the drivers installed.

    I can confirm the X52 is plugged in and it is working on Elite. Any help is greatly appreciated.

    Thanks,
    Hondo
    Hey, Hondo,

    The app accesses the stick through Saiteks "DirectOutput" dll. The error you're seeing sounds like what would happen if you didn't have that, e.g. I'd you had the version of the drivers that came with the stick.

    Can you confirm you have been to the Saitek website and downloaded and installed the latest version of their drivers?

    Which OS are you running? Xp? Vista? 7? Are you running it through a virtual machine or wine or something?

    Which version of python are you running? (Do python --version)

    Lastly, try doing a git pull to make sure you don't have an old version I'd broken ; g
    Author of Trade Dangerous.
    TD now has a Facebook Group!

  4. #34

    Arrow

    Originally Posted by soapmak3r View Post (Source)
    Might be a good idea to link directly to where we can download the required packages for anyone not familiar with them.


    Is it "Microsoft Access Database Engine 2010 Redistributable" that I need for "Microsoft Access 2010+ drivers"?

    Searching "Microsoft Access 2010+ drivers" brought up all kinds of results including CNET (likely malware/spyware infested) sponsored downloads.

    The other 2 were straight forward to locate though.

    Thanks for your effort.

    *EDIT* Ah well, guess this is not for me. I can't make head nor tail of it (as in, I don't even know how to get anything to load or what to do with the downloaded files).

    An Android app would be very handy, with a simple search function for trade routes and what is most profitable for any given route.
    Hi, soap.

    I thought it actually did direct the user thusly, mindbomb had added some error text.

    Ill be ditching the access requirement for something more pythonic in the next few days.

    It's currently command line driven, so you need a command prompt or shell in the directory the trade.py script is in, but that's why I gave this the title "power user" I may eventually give it a gui or a prompt driven shell of its own, but for now I was mostly trying to provide other developers a powerful tool for doing the grunt work.

    Example usage:

    C:/trade/> trade.py -v -v --ship type6 --cr 40000 --from morgor --avoid Anderson --avoid gold --hops 5 --via aulin
    Author of Trade Dangerous.
    TD now has a Facebook Group!

  5. #35
    Hi kfsone,

    Yep I can confirm I'm running version that is available on the saitek web site. I downloaded the Winodws 8.1 64bit version and installed it today.

    Im running Python version 3.4.1 and no virtual machine.

    Where can I find it via git. Version I download was from here:

    https://bitbucket.org/kfsone/tradedangerous/downloads

    Thanks,
    Hondo

  6. #36
    It is in git form, just git clone https://bitbucket.org/kfsone/tradedangerous.git
    Paraphrased from the post by Disembodied on the Oolite forums:
    Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: [Elite: Dangerous] takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. I don't think this is a wrong approach - just different to what a lot of people might be expecting.

  7. #37
    Originally Posted by Seonid View Post (Source)
    It is in git form, just git clone https://bitbucket.org/kfsone/tradedangerous.git

    so to confirm I did download the correct one?

  8. #38
    Originally Posted by Hondo View Post (Source)
    so to confirm I did download the correct one?
    It's a temporal question - i.e. when not where There's no auto-update, you just have to periodically get the new version, which is why doing it with git might be handy. If you don't know/have/want git, just pull the latest download periodically.

    BUT ... All that aside, I missed this when I was replying on the kindle last night:

    saitek.DirectOutput.DLLError: Unable to load DirectOutput.dll - possible 32/64 bit mismatch between Python interpreter and DLL
    You said you have the 64bit Saitek driver installed. If your python is 32-bit you'll have to also-install the 32-bit Saitek driver for it to be able to use it.

    I think.
    Author of Trade Dangerous.
    TD now has a Facebook Group!

  9. #39
    Hey Mate,

    I think you are right. I did have python 32bit version installed. I just went ahead and installed 64bit version. But I'm still getting the same error. This what I have done so far.

    1. Remove Python 32bit version and and installed Python 64bit
    2. Re-installed pypyodbc and ran setup.
    3. Re-isntalled Saitek x52 Pro drivers from the web site (Windows 8.1 64bit)

    Python Version:

    F:\Downloads\Trade Dangerous>python
    Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:45:13) [MSC v.1600 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>>

    When I run the command with x52 i get the following:
    Command: trade.py --ship hauler --from Chango --credits 20000 --hops 2 --x52-pro

    Error:

    Traceback (most recent call last):
    File "F:\Downloads\Trade Dangerous\saitek\DirectOutput.py", line 307, in __init__
    self.direct_output = DirectOutput(dll_path)
    File "F:\Downloads\Trade Dangerous\saitek\DirectOutput.py", line 99, in __init__
    self.DirectOutputDLL = ctypes.WinDLL(dll_path)
    File "F:\Program Files\Python\lib\ctypes\__init__.py", line 351, in __init__
    self._handle = _dlopen(self._name, mode)
    OSError: [WinError 193] %1 is not a valid Win32 application

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "F:\Downloads\Trade Dangerous\trade.py", line 84, in __init__
    self.doObj = saitek.X52Pro.SaitekX52Pro()
    File "F:\Downloads\Trade Dangerous\saitek\DirectOutput.py", line 309, in __init__
    raise DLLError(e.winerror)
    saitek.DirectOutput.DLLError: Unable to load DirectOutput.dll - possible 32/64 bit mismatch between Python interpreter and DLL

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "F:\Downloads\Trade Dangerous\trade.py", line 396, in <module>
    main()
    File "F:\Downloads\Trade Dangerous\trade.py", line 343, in main
    parse_command_line()
    File "F:\Downloads\Trade Dangerous\trade.py", line 264, in parse_command_line
    mfd = X52ProMFD()
    File "F:\Downloads\Trade Dangerous\trade.py", line 86, in __init__
    raise Exception('Unable to initialize the X52 Pro module. Make sure your X52 is plugged in and you have the drivers installed.')
    Exception: Unable to initialize the X52 Pro module. Make sure your X52 is plugged in and you have the drivers installed.


    I have tried everything I can think of

    Any help is greatly appreciated.

  10. #40
    Hi kfsone,

    I figured out what the problem was. I'm posting it here as it maybe useful to someone else.

    Problem was infact using the incorrect version of the DirectOutput.dll file. I have windows 8.1 64bit and have the Saitek 64 bit drivers install and it doesnt allow me to install the 32bit drivers because im running windows 8.1 64bit version.

    Problem is that DirectOutput.py is set use the 32bit version of DirectOutput.dll.

    To fix this I edited the following entry in the file:

    dll_path="C:\\Program Files (x86)\\Saitek\\DirectOutput\\DirectOutput.dll

    to

    dll_path="C:\\Program Files\\Saitek\\DirectOutput\\DirectOutput.dll

    Any now it works.


    Now I have couple of other questions.

    Do you need to use --checklist to make useful in the MFD?

    If I dont use --checklist it shows something in MFD for a second and it disappears.

    Same thing if I use --detail.

    Only way its useful is if I run --checklist then it steps you through it but You have to ALT-TAB to go to the next step. I know you have contacted Saitek about it, have you had a response?

    is it possible to display something like below without using --checklist and --detail

    I BOOTIS Chango Dock -> DAHAN Gateway:
    >-> At I BOOTIS/Chango Dock, Buy: 16 x Fish,
    + At LP 98-132/Freeport, Buy: 16 x Coltan,
    <-< DAHAN Gateway gaining 9,856cr => 29,856cr total

    Im not sure if the MFD is big enough to display all this info, but if you can get it to dot it it will be very useful as it has all the info you need really on the screen and you don't need to alt + tab out.

    Thanks,
    Hondo

  11. #41
    Originally Posted by Hondo View Post (Source)
    To fix this I edited the following entry in the file:

    dll_path="C:\\Program Files (x86)\\Saitek\\DirectOutput\\DirectOutput.dll

    to

    dll_path="C:\\Program Files\\Saitek\\DirectOutput\\DirectOutput.dll

    Any now it works.
    I'm working on removing the MS Access dependency right now (and then moving house tomorrow so there may be a short delay until I follow up again), but I'll do something about that - at least provide better feedback. Thanks for posting the detail.

    Originally Posted by Hondo View Post (Source)
    Now I have couple of other questions.

    Do you need to use --checklist to make useful in the MFD?
    Short answer: Yes.

    FYI - all of the commands can be abbreviated to their least-ambiguous abbreviation. "--cr" for credits, "--ch" for "checklist", "--x" for x52.

    I'll make it tell you that you need to supply an interactive command, such as --checklist, for it to be useful.

    If I dont use --checklist it shows something in MFD for a second and it disappears.
    It's saying "TradeDangerous" "INITIALIZING" lol.

    Originally Posted by Hondo View Post (Source)
    Only way its useful is if I run --checklist then it steps you through it but You have to ALT-TAB to go to the next step. I know you have contacted Saitek about it, have you had a response?
    Yes. They said "I'll ask one of the developers". I'm in temporary housing right now, on my way to a shiny new job at Facebook, and I'm moving into my permanent housing tomorrow and Tuesday. When I'm done with that and the wife lets me near a computer again, I'll chase them.

    Originally Posted by Hondo View Post (Source)
    is it possible to display something like below without using --checklist and --detail

    I BOOTIS Chango Dock -> DAHAN Gateway:
    >-> At I BOOTIS/Chango Dock, Buy: 16 x Fish,
    + At LP 98-132/Freeport, Buy: 16 x Coltan,
    <-< DAHAN Gateway gaining 9,856cr => 29,856cr total

    Im not sure if the MFD is big enough to display all this info, but if you can get it to dot it it will be very useful as it has all the info you need really on the screen and you don't need to alt + tab out.
    I'm still churning ideas for displays; if I hadn't left my G19 at Blizz I would have added a driver for that too.

    But the idea is that you'll be able to use the buttons on the stick below the MFD to go through steps. All I need is for Saitek to tell me why their driver isn't sending me those key presses. (I tried writing the app in C# and C++ to see if I could get it to work, and it didn't work there either, so it could just be that the X52 Pro drivers are shafted in perpetuity. Hopefully not, but brace yourself for the possibility)

    If you get the latest TD version, you'll see I cleaned up the display yesterday (less of the frippery crap like which hop and step).

    If you'd like to try out ideas on the stick itself, you can do the following (and, really, this is the reason I'm doing this project garage style like this instead of writing some super-pretty user-friendly app)

    [note: I have git bash installed, so where you see '$' it's basically equivalent to the dos prompt]

    Code:
    $ cd WHERE_TRADE.PY_IS
    $ python
    >>> import trade
    >>> mfd = trade.X52ProMFD()
    >>> mfd.display("This is the first line", "This is the middle line", "This is the last line")
    and you'll get a sense of what the constraints are.

    The marquee scrolling is a bit annoying, and I'd only be able to display 2-3 hops, but that might not be terrible. I'm just not sure there's a good way to use it all for anything but the simpler routes:

    Code:
    $ ./trade.py --hops 2 --ship type9 --from Chango --credits 6434431 --check --x52 --compact
    outputting
    Code:
    [Chango Dock 228 x Fish]
    [Aulin Enterprise 228 x Dom.Appliances]
    [Vonarburg Co-operative]
    looks a bit weird, and you have to wait for the scrolling to see what you're supposed to buy or where you're supposed to be

    Bear in mind: The next beta is likely to be introducing multiple stations per system (I'm incorporating that into the work I'm doing to move away from the access database right now)

    So you probably want it to display system as well as station name:

    Code:
    [CHANGO/Chango Dock 228 x Fish]
    [AULIN/Aulin Enterprise 228 x Dom.Appliances]
    [WYRD/Vonarburg Co-operative. KERCHING!]

    -Oliver
    Author of Trade Dangerous.
    TD now has a Facebook Group!

  12. #42
    Thanks Oliver for taking the time out to respond.

    Good luck with your new job and hopefully you will find some time to develop this little app bit more as I think Its one of the most useful apps out there.

    If we can the Saitek MFD to work properly as well as the G19 display to work that will be really handy...

    I'll take a look what you have suggested.... but Im not a competent programmer at all

  13. #43
    Originally Posted by Hondo View Post (Source)
    Good luck with your new job and hopefully you will find some time to develop this little app bit more as I think Its one of the most useful apps out there.
    It's just the moving house move the next couple of days that'll bite into my time, mostly because I might not have internet until later on Tuesday

    Originally Posted by Hondo View Post (Source)
    If we can the Saitek MFD to work properly as well as the G19 display to work that will be really handy...
    I'll bend their ear on Wednesday, if I haven't heard from them. And I'll see about picking up another G19 soon. If anyone else has any other MFD type displays I'll look into those down the line.

    Originally Posted by Hondo View Post (Source)
    I'll take a look what you have suggested.... but Im not a competent programmer at all
    Don't worry too much about programming, I just thought it might be handy to try out various display formats and see how they look on the MFD.

    If you've put the trade stuff into C:\TradeDangerous\ you'd do this to give yourself a connection to the MFD to play with:

    Code:
    C:\Users\Hondo\> cd \tradedangerous
    C:\TradeDangerous\> python
    >>> import trade
    >>> mfd = trade.X52ProMFD()
    and then just use change the stuff between quotes to try out whatever format you think might work:

    Code:
    >>> mfd.display("First thing", "Second Thing", "Third Thing")
    Given that, it'd put "First thing" on the top line, second on the middle and third on the bottom. You only get 3 lines on these MFDs (because they just couldn't waste enough space)

    So you could do:

    Code:
    >>> mfd.display("Trade 200 x Fish at CHANGO / Chango Dock", "Trade 200 x Dom.Appliances at AULIN / Aulin Enterprise", "FINISH at WYRD / Romanburg Convoluted-Name Place")
    and see how that looks on your MFD - I think you'll probably find the scrolling is really annoying

    I can write code, but I suck at visuals and layouts so - I welcome anyone's input on formatting/layout for the MFD

    -Oliver
    Author of Trade Dangerous.
    TD now has a Facebook Group!

  14. #44
    Originally Posted by Hondo View Post (Source)
    Thanks Oliver for taking the time out to respond.

    Good luck with your new job and hopefully you will find some time to develop this little app bit more as I think Its one of the most useful apps out there.

    If we can the Saitek MFD to work properly as well as the G19 display to work that will be really handy...

    I'll take a look what you have suggested.... but Im not a competent programmer at all
    Oh, and if you get tired of having to do manual downloads, you can use "git" to pull the latest versions.

    Option 1: Install "Source Tree" from Atlassian. Then it's a gui and fairly self explanatory. Just do a "pull" periodically. Might be a bit excessive if you're only using it to update TradeDangerous, lol.

    Option 2: Install "git" http://git-scm.com/download/win
    Figure out where you want to put TD, e.g. you could put it in "trade" under your windows home directory... Open a command prompt and use the command below:

    Code:
    C:\Users\Hondo\> git clone git@bitbucket.org:kfsone/tradedangerous.git tradedangerous
    If you don't want to have to be typing 'tradedangerous' all the time

    Code:
    C:\Users\Hondo\> git clone git@bitbucket.org:kfsone/tradedangerous.git td
    will extract it into a directory called 'td' instead.

    If you want it somewhere else, say C:\td

    Code:
    C:\Users\Hondo\> cd \
    C:\> git clone git@bitbucket.org:kfsone/tradedangerous.git td
    To use it.. just cd into the directory

    Code:
    C:\Users\Hondo\> cd tradedangerous
    C:\Users\Hondo\tradedangerous\> trade.py ...
    or
    C:\Users\Hondo\> cd td
    C:\Users\Hondo\td\> trade.py ...
    or
    C:\Users\Hondo\> cd \td
    C:\td\> trade.py ...
    depending where you put it

    To refresh with the latest code:

    Code:
    C:\Wherever\td\> git pull
    and it'll update itself.
    Author of Trade Dangerous.
    TD now has a Facebook Group!

  15. #45
    I'd like to add my thanks for this script too. It's excellent, and has rescued me from my spreadsheet so I can now concentrate on flying instead of working out routes... I had tried some of the other trading applications too, but I prefer this by a long shot.

    Duchess Commander Crank Larson

    Twitch | YouTube

Page 3 of 154 FirstFirst 123456713 ... LastLast