The 3h file was corrupted about 4 hours ago for about 30minutes. I thought I caught it then. Is it still corrupted? Which file is corrupted? I just did an update and it works OK.
The full prices file. I sent you a PM. Only 1 station.
The 3h file was corrupted about 4 hours ago for about 30minutes. I thought I caught it then. Is it still corrupted? Which file is corrupted? I just did an update and it works OK.
NOTE: Rebuilding cache file: this may take a moment.*** INTERNAL ERROR: CHECK constraint failed: Station
CSV File: P:\Program Files (x86)\td\data\Station.csv:294
SQL Query: INSERT INTO Station (system_id,name,ls_from_star,blackmarket,max_pad_size) VALUES((SELECT System.system_id FROM System WHERE System.name = ?),?,?,?,?)
Params: ['78 URSAE MAJORIS', 'Landis Freeport', '-1', '?', '?']
NOTE: Rebuilding cache file: this may take a moment.P:\Program Files (x86)\td\trade.py: Station.csv:5951 ERROR Station 'Bondar City' is marked as DELETED and should not be used.
NOTE: Rebuilding cache file: this may take a moment.P:\Program Files (x86)\td\trade.py: P:\Program Files (x86)\td\data\TradeDangerous.prices:429656 ERROR Unrecognized STAR/Station: "ADEO/FOOA PORT"
NOTE: Rebuilding cache file: this may take a moment.
Traceback (most recent call last):
File "P:\Program Files (x86)\td\trade.py", line 102, in <module>
main(sys.argv)
File "P:\Program Files (x86)\td\trade.py", line 52, in main
tdb = tradedb.TradeDB(cmdenv, load=cmdenv.wantsTradeDB)
File "P:\Program Files (x86)\td\tradedb.py", line 555, in __init__
self.reloadCache()
File "P:\Program Files (x86)\td\tradedb.py", line 641, in reloadCache
cache.buildCache(self, self.tdenv)
File "P:\Program Files (x86)\td\cache.py", line 1043, in buildCache
processPricesFile(tdenv, tempDB, pricesPath)
File "P:\Program Files (x86)\td\cache.py", line 745, in processPricesFile
tdenv, pricesFh, db, defaultZero
File "P:\Program Files (x86)\td\cache.py", line 695, in processPrices
changeStation(matches)
File "P:\Program Files (x86)\td\cache.py", line 584, in changeStation
processedStations[stationID]
KeyError: -111
I edited station.csv to set the distance to -1 and uploaded to maddavo
Then I tried trade.py station --rm <system/station> and got an error about the line I'd edited
Then I edited the line and tried the command again. This time I got an errorCode:NOTE: Rebuilding cache file: this may take a moment.*** INTERNAL ERROR: CHECK constraint failed: Station CSV File: P:\Program Files (x86)\td\data\Station.csv:294 SQL Query: INSERT INTO Station (system_id,name,ls_from_star,blackmarket,max_pad_size) VALUES((SELECT System.system_id FROM System WHERE System.name = ?),?,?,?,?) Params: ['78 URSAE MAJORIS', 'Landis Freeport', '-1', '?', '?']
So I deleted that line from station.csv and tried again. Another error this timeCode:NOTE: Rebuilding cache file: this may take a moment.P:\Program Files (x86)\td\trade.py: Station.csv:5951 ERROR Station 'Bondar City' is marked as DELETED and should not be used.
Looking at maddavo's site I see that the station has been changed to FODA PORT so I edited TradeDangerous.prices file and tried yet again.Code:NOTE: Rebuilding cache file: this may take a moment.P:\Program Files (x86)\td\trade.py: P:\Program Files (x86)\td\data\TradeDangerous.prices:429656 ERROR Unrecognized STAR/Station: "ADEO/FOOA PORT"
Code:NOTE: Rebuilding cache file: this may take a moment. Traceback (most recent call last): File "P:\Program Files (x86)\td\trade.py", line 102, in <module> main(sys.argv) File "P:\Program Files (x86)\td\trade.py", line 52, in main tdb = tradedb.TradeDB(cmdenv, load=cmdenv.wantsTradeDB) File "P:\Program Files (x86)\td\tradedb.py", line 555, in __init__ self.reloadCache() File "P:\Program Files (x86)\td\tradedb.py", line 641, in reloadCache cache.buildCache(self, self.tdenv) File "P:\Program Files (x86)\td\cache.py", line 1043, in buildCache processPricesFile(tdenv, tempDB, pricesPath) File "P:\Program Files (x86)\td\cache.py", line 745, in processPricesFile tdenv, pricesFh, db, defaultZero File "P:\Program Files (x86)\td\cache.py", line 695, in processPrices changeStation(matches) File "P:\Program Files (x86)\td\cache.py", line 584, in changeStation processedStations[stationID] KeyError: -111
Stuck now.buildcache -f produces the same error.
buildcache: just rebuild the cache and exit,
-f: do it even if the .db file exists
-i: ignore "unknown station" errors and add them to the db
Noob question.
Once I've Exported from EliteOCR to TradeDangerous and got my import.prices files, what command should I use to :
1) Update my local TD
and
2) Upload that data for it to be shared.
I'm already sending from EliteOCR to EDDN and saving csv and bpc for contributing data elsewhere.
What brought me to TD was the desire to see Station distance and pad size updated more often and accurately.
What I find is an immensely powerful tool, even if it does come with a bit of a learning curve ...
trade.py --help
trade.py import --help
trade.py import
Noob question.
Once I've Exported from EliteOCR to TradeDangerous and got my import.prices files, what command should I use to :
1) Update my local TD
and
2) Upload that data for it to be shared.
I'm already sending from EliteOCR to EDDN and saving csv and bpc for contributing data elsewhere.
What brought me to TD was the desire to see Station distance and pad size updated more often and accurately.
What I find is an immensely powerful tool, even if it does come with a bit of a learning curve ...
trade.py import import.prices
python -m misc.madupload data/Station.csv
trade.py import --plug=maddavo --opt=stncsv --opt=syscsv
tdrun lhs1914 --hops 6 --jumps 5 --gpt 900
v6.10.0 Feb 14 2015
. (kfsone) Major changes to the 'maddavo' plugin:
- The plugin now supports "merging" of Systems and Stations from
maddavo's site into your local db. It does not, by default, write
these to the ".csv" files.
- Removed "--opt=syscsv" and "--opt=stncsv",
- Added "--opt=systems" and "--opt=stations" and "--exportcsv",
- Assorted cleanup
Also:
. (kfsone) "run" with "--progress" is less silent,
. (kfsone) Fixed 'set changed size' error in run command
. (kfsone) Improvements to the TradeCalc api for accessing station trades
. (kfsone) Added "--gain-per-ton" (--gpt) to run command
. (kfsone) Added "CSVStream" class to transfers.py
. (kfsone) Added "Progress" progress-bar class to misc/progress.py
+ 130 new systems from EDSC
C:\Trade>trade.py run --from "Verbigeni/Archambault" --credits 4292 --capacity 4
--ly-per 6.96 --jumps 5 -vv
VERBIGENI/Archambault Plant -> SUN TAKUSH/McNair Gateway (score: 4179.067940)
Load from VERBIGENI/Archambault Plant (234ls/star, No/bm, Med/pad):
2 x Lithium 1,445cr vs 1,952cr, 4 days vs 2 days
2 x Cobalt 603cr vs 948cr, 4 days vs 2 days
Jump VERBIGENI -> BRANI
Unload at [B]BRANI/Naddoddur Terminal[/B] (no details) => Gain 1,704cr (426cr/ton) =>
5,996cr
Load from [B]BRANI/Naddoddur Terminal[/B] (no details):
3 x Robotics 1,511cr vs 2,207cr, 2 days vs 6 days
1 x Semiconductors 783cr vs 1,172cr, 2 days vs 6 days
Jump BRANI -> NLTT 48288 -> ALRAI SECTOR LC-V B2-4 -> SUN TAKUSH
Unload at SUN TAKUSH/McNair Gateway (1,384ls/star, No/bm, Lrg/pad) => Gain 2,4
77cr (619.25cr/ton) => 8,473cr
----------------------------------------------------------------------------
Finish at SUN TAKUSH/McNair Gateway (1,384ls/star, No/bm, Lrg/pad) gaining 4,1
81cr => est 8,473cr total
C:\Trade>trade.py run --from "Brani/Akiyama Market" --credits 3786 --capacity 4
--ly-per 6.96 --jumps 5 -vv
BRANI/Akiyama Market -> ABUKUNIN/Reilly Hub (score: 4166.471600)
Load from BRANI/Akiyama Market (46ls/star, No/bm, Lrg/pad):
3 x Coffee 1,194cr vs 1,640cr, 4 days vs 2 days
1 x Mineral Oil 119cr vs 327cr, 4 days vs 2 days
Jump BRANI
Unload at [B]BRANI/Ride Ring[/B] (no details) => Gain 1,546cr (386.5cr/ton) => 5,332c
r
Load from [B]BRANI/Ride Ring[/B] (no details):
3 x Non-Lethal Weapons 1,497cr vs 2,200cr, 2 days vs 4 days
1 x Agri-Medicines 801cr vs 1,312cr, 2 days vs 4 days
Jump BRANI -> VERBIGENI -> ABUKUNIN
Unload at ABUKUNIN/Reilly Hub (171ls/star, Yes/bm, Lrg/pad) => Gain 2,620cr (6
55cr/ton) => 7,952cr
----------------------------------------------------------------------------
Finish at ABUKUNIN/Reilly Hub (171ls/star, Yes/bm, Lrg/pad) gaining 4,166cr =>
est 7,952cr total
The last two times I tried to use trade dangerous, it is trying to send me to places that don't exist.
BRANI/Naddoddur Terminal and BRANI/Ride Ring
Is there a way to stop this so I stop losing money?
Also using new version trying to import
C:\Trade>trade.py import --plug=maddavo --opt=systems --opt=stations
Traceback (most recent call last):
File "C:\Trade\trade.py", line 102, in <module>
main(sys.argv)
File "C:\Trade\trade.py", line 76, in main
results = cmdenv.run(tdb)
File "C:\Trade\commands\commandenv.py", line 80, in run
return self._cmd.run(results, self, tdb)
File "C:\Trade\commands\import_cmd.py", line 96, in run
if not plugin.run():
File "C:\Trade\plugins\maddavo_plug.py", line 305, in run
tdb.load(maxSystemLinkLy=tdenv.maxSystemLinkLy)
File "C:\Trade\tradedb.py", line 1856, in load
self._loadSystems()
File "C:\Trade\tradedb.py", line 673, in _loadSystems
self.cur.execute(stmt)
sqlite3.OperationalError: no such table: System
Ok it seems that I'm too impatient... the output that used to show "Hops 1" updating to Hops X, etc... is now missing.Hi. I'm a big fan of this tool and have been using it for a while.
I've just upgraded to the latest version by copying down the latest version and overwriting my locally held files. I run this on a Mac so I've update the opening line of trade.py to Python 3. However when calculating a run it just hangs now... not a bean from the script. I have to break in to the script to stop it running.
Any ideas anyone?
Ok it seems that I'm too impatient... the output that used to show "Hops 1" updating to Hops X, etc... is now missing.
To update local TD using EliteOCR export (EliteOCR creates an import.prices file):
Code:trade.py import import.prices
You do not need to upload prices if you send to EDDN with EliteOCR - we use EDDN.
To upload stations to be shared:
Code:python -m misc.madupload data/Station.csv
EDIT: HAHA Ninja'd!
Thanks for that, most useful.
I've just set my Win7 PATH to avoid having to cd for TD Python stuff but the misc.madupload only appears to work when I HAVE cd'ed to the TD folder ... Is there a way around that?
SET TRADEDIR="C:\Dev\Trade"
SET CMDR="[i]your commander name here[/i]"
cd %TRADEDIR%
cmd
trade.py local --ly=0 Branglal -vv
System Dist
/ Station StnLs Age/days BMkt Pad Itms
-----------------------------------------------------------------------
BRANGLAL 0.00
/ Gibson Horizons 882 2.89 No Lrg 66
/ Skripochka Gateway 882 0.00 No Lrg 66
/ Skripochr Gateway ? - ? ? 0
T
trying out that Circular Route command in the CookBook. doesn't want to work for me.
Have the commands changed or maybe the Data doesn't have the example stations anymore ... ?
Update
OK. Tried my own stations and getting a response now![]()
Thanks for the tips.One thing you could do is create a "tradecmd.bat" batch file (.bat):
Code:SET TRADEDIR="C:\Dev\Trade" SET CMDR="[i]your commander name here[/i]" cd %TRADEDIR% cmd
Then you can just create a shortcut to it and put that onto your taskbar/start menu/wherever is convenient for you.
Once you've used it a couple of times, you should find that you can hit the windows key and start typing "trade" and it'll find it for you, so you can just hit return...
SET CMDR="[i]your commander name here[/i]"
python -m misc.madupload data/Station.csv
My bad - the example was from my own local database of data as I do not use the crowdsourced one, and wanted to use one that I knew would work if someone tried it. If they had the data. Oops. Unfortunately I generally don't hang out in the main areas that are common to most, but at the fringes of known space, so likely do not have a better example in my database (I might have something around one of the starter systems, will check). If you have a better example that would be more likely in the crowdsourced data, please add it to the wiki.
kfsone, just in case you were wondering, I have been out of action with Real Life(tm) issues combined with East Coast Snowpocalypse I and II the past couple of weeks. Hopefully things are getting back to what passes for normal now and I will have some more time to get going on the UI again this coming weekend hopefully.
Edit: somewhere about halfway back in this thread is another example that may use more common systems, if anyone wants to look for it and add it to the wiki.