Bug with latest version of zenbot and mongo db
Please go to Stack Overflow for help and support:
https://stackoverflow.com/questions/tagged/zenbot
If you open a GitHub issue, here is our policy:
- It must be a bug or a feature request.
- The form below must be filled out.
Here's why we have that policy: Zenbot developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies hundreds of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.
System information
- Have I written custom code (as opposed to using zenbot vanilla):no
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04):linux amd64
- Zenbot version: latest from github
- NodeJS version: 8.9.2
- Python version: no
- Exact command to reproduce:./zenbot.sh backfill gdax.BTC-EUR --days 1
Describe the problem
Morning,
I just git pulled the latest version of Zenbot (unstable) then i wanted to backfill some data from gdax. Now i have this error with mongo db And of course before to git pull all was working well !
Someone has the same issue ? And please test and retest the code before to release (start with a new install and check the basics of the bot), i have a bot in production and since hours all is off...
Source code / logs
`/zenbot/node_modules/sosa_mongo/mongo_backend.js:22 var coll = db.collection(coll_path); ^
TypeError: db.collection is not a function `
It looks like sosa_mongo is one of carlos's old repos and needs to be brought up to speed with, what I can only assume is the breaking change, the upgraded mongodb package.
do you have the same issue ? and how to solve it ?
When I pulled in the fresh unstable branch, yea
ok and how to pull from master ? To have a working bot ...
git reset --hard HEAD^ is probably the easiest way to clear changes, and pull everything but the last commit. I've confirmed this works.
tried your solution but the issue is always here. do you know another solution to solve it ?
@DeviaVir do you tested the unstable branch with a fresh install ? do you have the same issue like me ?
Did you run npm i after resetting your HEAD?
yes and before i used:
rm -rf node_modules
because you can't install the bot without this command
Same issue, just installed for the first time. Clean mongo install and clean repo npm install.
`➜ zenbot git:(unstable) ✗ ./zenbot.sh trade --paper /Users/xxx/zenbot/node_modules/sosa_mongo/mongo_backend.js:22 var coll = db.collection(coll_path); ^
TypeError: db.collection is not a function`
Mongod version:
➜ zenbot git:(unstable) ✗ mongod --version
db version v3.6.2
git version: 489d177dbd0f0420a8ca04d39fd78d0a2c539420
OpenSSL version: OpenSSL 1.0.2n 7 Dec 2017
allocator: system
modules: none
build environment:
distarch: x86_64
target_arch: x86_64
I think I've got a fix, PR incoming.
Merged, closing.