Open jasonnator opened 6 years ago
Same problem here
$ go run tastypl.go -input ../tastyworks_transactions.csv -printpl -positions
# command-line-arguments
./tastypl.go:1259:12: undefined: chart.MarketHoursRange
I just tried this out today and am also stuck with the same problem. @gotasty, can you please help?
@jasonnator @freeurmind I got it figured out. The issue is that @gotasty forked the go-chart project (https://github.com/gotasty/go-chart) and code within this repo references changes made in that go-chart fork.
The reason for the fork was to define market hours, NYSE holidays, etc. which tastypl then needs in order to analyze the data.
To get it working you have to update dependency references in various places.
1.) run go get -u github.com/gotasty/go-chart
to go fetch the forked dependency.
2.) change the following lines to refer to "gotasty" instead of "wcharczuk" in the following files
REPO: tastypl
REPO: gotasty/go-chart
3.) use the project like normal as described in the readme
@timnovinger great, thanks for the follow up!
To anyone still having this issue or something similar: Since the original creator appears to be out of commission, my fork https://github.com/Graeme22/tastypl should be working and has step by step install instructions. Hope this helps!
I've followed all the installation instructions but keep getting this message:
tastypl.go:30:2: no required module provides package github.com/Graeme22/go-chart: working directory is not part of a module tastypl.go:31:2: no required module provides package github.com/Graeme22/go-chart/util: working directory is not part of a module tastypl.go:28:2: no required module provides package github.com/golang/glog: working directory is not part of a module tastypl.go:29:2: no required module provides package github.com/shopspring/decimal: working directory is not part of a module
Any help would be greatly appreciated. Thanks.
I've followed all the installation instructions but keep getting this message:
tastypl.go:30:2: no required module provides package github.com/Graeme22/go-chart: working directory is not part of a module tastypl.go:31:2: no required module provides package github.com/Graeme22/go-chart/util: working directory is not part of a module tastypl.go:28:2: no required module provides package github.com/golang/glog: working directory is not part of a module tastypl.go:29:2: no required module provides package github.com/shopspring/decimal: working directory is not part of a module
Any help would be greatly appreciated. Thanks.
Hi @fourjacks,
I ran into the same issue. Looks like Go updated the language specification and modules are now on by default. I have added a new command to the readme which should fix the problem. Let me know if that works for you! (By the way, you should have to reinstall the libraries.)
Thanks very much for the quick response and help.
I ran through all the steps from the start and now I am getting a different error message:
"F0303 21:56:15.164828 27868 tastypl.go:331] can't convert -- to decimal goroutine 1 [running]: github.com/golang/glog.stacks(0xc000070800, 0xc00024ca00, 0x4a, 0x9b)"
That is followed by a long string of more lines like that and a bunch of links to destinations on the C: drive. Then it ends with:
"exit status 255"
Thanks very much for the quick response and help.
I ran through all the steps from the start and now I am getting a different error message:
"F0303 21:56:15.164828 27868 tastypl.go:331] can't convert -- to decimal goroutine 1 [running]: github.com/golang/glog.stacks(0xc000070800, 0xc00024ca00, 0x4a, 0x9b)"
That is followed by a long string of more lines like that and a bunch of links to destinations on the C: drive. Then it ends with:
"exit status 255"
My guess is it's struggling with the money movement entries. A quick fix would be just remove those lines from the csv. I won't be updating the code base as it's kind of a mess, but I am looking at potentially rewriting everything in python down the road, should be a lot slimmer but less buggy.
Weird, still can't get this to work. I removed all the row entries from the CSV that are not options trades, and I'm still getting a string of errors.
Similar to before but now starts with:
F0304 16:17:38.416678 5144 tastypl.go:659] record #0, bad transaction date: parsing time "2/19/2021": extra text: "21" goroutine 1 [running]:
Weird, still can't get this to work. I removed all the row entries from the CSV that are not options trades, and I'm still getting a string of errors.
Similar to before but now starts with:
F0304 16:17:38.416678 5144 tastypl.go:659] record #0, bad transaction date: parsing time "2/19/2021": extra text: "21" goroutine 1 [running]:
You're using the wrong CSV file. Try following the instructions again but with the CSV from the transactions tab.
I retraced my steps and re-read the directions. Went to the "History" tab then "Transactions." Did the custom date range, scrolled to the bottom as instructed, and exported to CSV. Still getting errors.
But seems you are on to something on the CSV, as now it is saying this:
F0304 22:41:51.352941 9360 tastypl.go:1575] CSV seems malformed goroutine 1 [running]: github.com/golang/glog.stacks(0xc000070700, 0xc000246d20, 0x43, 0x93)...
I retraced my steps and re-read the directions. Went to the "History" tab then "Transactions." Did the custom date range, scrolled to the bottom as instructed, and exported to CSV. Still getting errors.
But seems you are on to something on the CSV, as now it is saying this:
F0304 22:41:51.352941 9360 tastypl.go:1575] CSV seems malformed goroutine 1 [running]: github.com/golang/glog.stacks(0xc000070700, 0xc000246d20, 0x43, 0x93)...
Gotcha. Could you open an issue on my fork please, and provide more details? Thanks.
Realized that I just opened an issue on the original. I don't see an option to open an issue on your fork?
Realized that I just opened an issue on the original. I don't see an option to open an issue on your fork?
My apologies, for some reason they were disabled.
Once all packages were installed, I tried running per the README and received the error below. I removed and redownloaded the package, then tried >
go build
which results in the same error....\tastypl.go:1259:12: undefined: chart.MarketHoursRange