In-Development TradeDangerous: power-user trade optimizer

to redo the prices.last i just typed them and copied them into each individual box in the GUI... and then made sure they were all correct so that it would work. I COULD use NOTEPAD++ to edit them though but i just chose to use the GUI instead so that everything was done correctly.


Here are the commands that I have used:


trade.py update nima/rush -F -A

trade.py update nima/rash -F -A

trade.py update nima/bur -F -A

trade.py update branglal/skri -F -A

trade.py update branglal/gib -F -A

Odd, I didn't think the GUI would let you enter a number with a comma in it -- do you know how you managed to enter that value? (I'd like to make it so that it either translates it for you or at least warns you)
 
Odd, I didn't think the GUI would let you enter a number with a comma in it -- do you know how you managed to enter that value? (I'd like to make it so that it either translates it for you or at least warns you)
well when i did it with a comma and clicked the X to save it came out with a error in the command prompt
 
Has anyone got TD displaying info on their X52 (non-pro)? Or do you have to have the pro version?

I have the X52 Pro, so I can't speak to the non-pro.

However, the main thing is that your driver has to be the same *bits* at the python you're running. If you're running 32-bit python, you need to be running the 32-bit saitek drivers because ... they're a bit crap when it comes to driver support.

- - - - - Additional Content Posted / Auto Merge - - - - -

i have a x52 pro and i can't get the display command to work aswell i have the correct drivers installed

What error do you get?

- - - - - Additional Content Posted / Auto Merge - - - - -

Latest Code:

- Added "--max-days-old" (-MD) to the "run" command

Code:
[color=red][b]$ "/c/dev/trade/trade.py" run -vv --ly 12.39 --empty 14.70 --cap 40 --jumps 6 --cr 259388 --from "kellydock" --hops 1 --max-days=2.5[/b][/color]
GONG GU/Kelly Dock -> AIABIKO/Maxwell Orbital:
  Load from GONG GU/Kelly Dock:
       40 x Indium      5,534cr each,    221,360cr total (2days)
  Jump GONG GU -> AUREA -> UPSILON-1 CEPHEI -> CIGURU -> AIABIKO => Gain 34,600cr (865cr/ton) => 293,988cr
  ----------------------------------------------------------------------------
  Finish at AIABIKO/Maxwell Orbital gaining 34,600cr => est 293,988cr total

osmith@WOTSIT /c/dev/trade (master)
[color=red][b]$ "/c/dev/trade/trade.py" run -vv --ly 12.39 --empty 14.70 --cap 40 --jumps 6 --cr 259388 --from "kellydock" --hops 1 --max-days=0.5[/b][/color]
GONG GU/Kelly Dock -> ICONTIA/Betancourt Refinery:
  Load from GONG GU/Kelly Dock:
       40 x Indium      5,534cr each,    221,360cr total (11hrs)
  Jump GONG GU -> MCC 813 -> AO SHUN -> HR 7294 -> LHANGKAMBE -> ICONTIA => Gain 24,280cr (607cr/ton) => 283,668cr
  ----------------------------------------------------------------------------
  Finish at ICONTIA/Betancourt Refinery gaining 24,280cr => est 283,668cr total
 
Last edited:
Code:
WARNING:root:DLLError 193
mfd: error#193: Unable to initialize the Saitek X52 Pro module: possible 32/64 bit mismatch between
Python interpreter and DLL. Make sure you have installed both the 32- and 64-bit driver from Saitek's website

and on http://www.saitek.com/uk/down/drivers.php

Selecting from : Pro Flight range

Selected product : X52 Pro

Selected OS : Windows 8.1/8/7 and Vista 64 bit
 
Last edited:
Code:
WARNING:root:DLLError 193
mfd: error#193: Unable to initialize the Saitek X52 Pro module: possible 32/64 bit mismatch between
Python interpreter and DLL. Make sure you have installed both the 32- and 64-bit driver from Saitek's website

and on http://www.saitek.com/uk/down/drivers.php

Selecting from : Pro Flight range

Selected product : X52 Pro

Selected OS : Windows 8.1/8/7 and Vista 64 bit

At a command prompt, type

Code:
python

and paste the first two lines of output.
 
Code:
WARNING:root:DLLError 193
mfd: error#193: Unable to initialize the Saitek X52 Pro module: possible 32/64 bit mismatch between
Python interpreter and DLL. Make sure you have installed both the 32- and 64-bit driver from Saitek's website

and on http://www.saitek.com/uk/down/drivers.php

Selecting from : Pro Flight range

Selected product : X52 Pro

Selected OS : Windows 8.1/8/7 and Vista 64 bit

The other thing you might want to do is look in

Code:
C:\Program Files\Saitek\DirectOutput\

and

Code:
C:\Program Files (x86)\Saitek\DirectOutput\

Do you have

a/ one or both directories?
b/ a directory called "SDK" in one of them?
c/ an "Examples" directory in the SDK folders?
d/ an SDK/Examples/Test/Test.Exe in one of them?

If you do - try running it. It gives you a list of recognized devices and you have to double click on the one you want to test. Then you can press buttons/etc to see if it recognizes them. It's supposed to work with the "soft" buttons under the MFD but it's broken and they have been giving me the run-around asking about fixes.

-Oliver

- - - - - Additional Content Posted / Auto Merge - - - - -

i dont think you typed the right command i should enter cause the word
Code:
python
only gives the following text

'python' is not recognized as an internal or external command,
operable program or batch file.

That has something to do with how you installed it, I think there's an option to "add python to the path" or something, and you chose not to, or haven't rebooted since it was installed :)

I'm running 32-bit python, I'll try upgrading to 64-bit tomorrow and see if I run into the same problem (I thought I *was* running 64-bit but I think early versions of TD depended on some MS library that was only available for 32 bit)


-Oliver
 
The other thing you might want to do is look in

Code:
C:\Program Files\Saitek\DirectOutput\

and

Code:
C:\Program Files (x86)\Saitek\DirectOutput\

Do you have

a/ one or both directories?
b/ a directory called "SDK" in one of them?
c/ an "Examples" directory in the SDK folders?
d/ an SDK/Examples/Test/Test.Exe in one of them?

If you do - try running it. It gives you a list of recognized devices and you have to double click on the one you want to test. Then you can press buttons/etc to see if it recognizes them. It's supposed to work with the "soft" buttons under the MFD but it's broken and they have been giving me the run-around asking about fixes.

-Oliver

- - - - - Additional Content Posted / Auto Merge - - - - -



That has something to do with how you installed it, I think there's an option to "add python to the path" or something, and you chose not to, or haven't rebooted since it was installed :)

I'm running 32-bit python, I'll try upgrading to 64-bit tomorrow and see if I run into the same problem (I thought I *was* running 64-bit but I think early versions of TD depended on some MS library that was only available for 32 bit)


-Oliver
i have a Saitek\DirectOutput in both the "program files" and "program files (x86)" directories but the SDK is only in the "program files" directiry not the x86 one

this is what the test looks like
View attachment 4633
 
Last edited:
Also, if you'd be willing to be a guineapig to help figure out why this isn't working - would you mind going back to the saitek download page, and next to the "download driver" there is a "download software" button... try installing that and see if that makes it work.

I don't have that installed, but I think if you install it and then uninstall it, it leaves the necessary bit of the driver in-place.

- - - - - Additional Content Posted / Auto Merge - - - - -

Never mind - it is explicitly looking for the 32-bit version. I'll fix it tomorrow.
 
Also, if you'd be willing to be a guineapig to help figure out why this isn't working - would you mind going back to the saitek download page, and next to the "download driver" there is a "download software" button... try installing that and see if that makes it work.

I don't have that installed, but I think if you install it and then uninstall it, it leaves the necessary bit of the driver in-place.

- - - - - Additional Content Posted / Auto Merge - - - - -

Never mind - it is explicitly looking for the 32-bit version. I'll fix it tomorrow.

i allready have that installed i got both the driver and software installed

but i installed it again just incase, just for you and still getting the same error message
 
Last edited:
well in the start menu when i click the python folder there's a shortcut in there named Python (command line) and when i click on that it says

Code:
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.
>>>

heading to bed now its almost 5am here on the east coast of the USA :p
 
Last edited:

wolverine2710

Tutorial & Guide Writer
Alpha version of EDDN has been released by jamesremuscat

Brilliant. Jamesremuscat has released an Alpha version of EDDN - see my signature. That combined with viable OCR solutions out there (ie EliteOCR) means we get our market prices back. Now that the Alpha has been released I hope support for it will be coming in the tools - in this case Trade Dangerous.
 
getting a new error now when trying to import prices

Code:
trade.py import -i http://kfs.org/td/prices
NOTE: Rebuilding cache file: this may take a moment
*** INTERNAL ERROR: NOT NULL constraint failed: ShipVendor.station_id
CSV File: ShipVendor.csv:10
SQL Query: INSERT INTO ShipVendor (station_id,ship_id,cost) VALUES((SELECT Station.station_id FROM Station INNER JOIN System USING(system_id) WHERE System.name = ? AND Station.name = ?),(SELECT Ship.ship_id FROM Ship WHERE Ship.name = ?),?)
Params: ['Djendelis', 'Atwater Enterprise', 'Adder', '87808']


import -i --maddavo
NOTE: Rebuilding cache file: this may take a moment
*** INTERNAL ERROR: NOT NULL constraint failed: ShipVendor.station_id
CSV File: ShipVendor.csv:10
SQL Query: INSERT INTO ShipVendor (station_id,ship_id,cost) VALUES((SELECT Station.station_id FROM Station INNER JOIN System USING(system_id) WHERE System.name = ? AND Station.name = ?),(SELECT Ship.ship_id FROM Ship WHERE Ship.name = ?),?)
Params: ['Djendelis', 'Atwater Enterprise', 'Adder', '87808']

and i did update the program and re-imported the new station and system files from Maddavo's site before i typed in the command




to fix it i had to delete it in the SourceTree and then delete the folder and then click the clone button again on your site
but then it gets errors saying:

Code:
import.prices:12883 Unrecognized STAR/Station, 'BHIL MINA/MOHMAND GATEWAY'.
import.prices:12977 Unrecognized STAR/Station, 'BHIL MINA/STURCKOW DOCK'.
import.prices:25891 Unrecognized STAR/Station, 'FN VIRGINIS/JACOBI LANDING'.
import.prices:31663 Unrecognized STAR/Station, 'HASTAR/ALVARES ENTERPRISE'.
import.prices:37855 Unrecognized STAR/Station, 'KHANCI/BLOOMFIELD COLONY'.
import.prices:37995 Unrecognized STAR/Station, 'KHANCI/TANI COLONY'.
import.prices:41539 Unrecognized STAR/Station, 'LEMASTSHI/LONCHAKOV DOCK'.
import.prices:41765 Unrecognized STAR/Station, 'LFT 140/FORD ORBITAL'.
import.prices:60453 Unrecognized STAR/Station, 'MURACING/BABBAGE HORIZONS'.
import.prices:60617 Unrecognized STAR/Station, 'MURACING/HERZFELD GATEWAY'.
import.prices:61717 Unrecognized STAR/Station, 'NEGANHOT/HE LANDING'.
import.prices:80565 Unrecognized STAR/Station, 'V816 HERCULIS/HOBAUGH HANGER'.
import.prices:80709 Unrecognized STAR/Station, 'V816 HERCULIS/WILLIS INSTALLATION'.
import.prices:82229 Unrecognized STAR/Station, 'WEN KUANEI/HUTCHINSON LANDING'.
import.prices:82381 Unrecognized STAR/Station, 'WEN KUANEI/NIVEN RELAY'.
import.prices:84259 Unrecognized STAR/Station, 'WOLF 46/FRANKLIN DOCK'.


so when i tried to import the station and system files again im getting the same error i started with.....
 
Last edited:
You need to manually add two stations to the Station.csv file, I have let Maddavo know they are missing from his files.

'Djendelis','Atwater Enterprise',0
'HIP 87369','Carey Port',0

then the prices will import correctly
 
Looking at that failed query message, and that something is null that shouldn't be, I'd guess that the 'Djendelis', 'Atwater Enterprise' station and/or the 'Djendelis' system are either missing from station.csv or system.csv respecively, or there's a typo/mismatch between the spelling in the system.csv, station.csv and ShipVendor.csv

I don't beleive that TradeDangerous makes any use of the ShipVendor.csv file. It's safe to remove the rows from that, but leave the first line.
 
You need to manually add two stations to the Station.csv file, I have let Maddavo know they are missing from his files.

'Djendelis','Atwater Enterprise',0
'HIP 87369','Carey Port',0

then the prices will import correctly

ok that sure did fix it and i had to do nothing elce and it worked!
 
Back
Top Bottom