zenbot icon indicating copy to clipboard operation
zenbot copied to clipboard

Bug with latest version of zenbot and mongo db

Open ttrd06 opened this issue 8 years ago • 11 comments

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:

  1. It must be a bug or a feature request.
  2. 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 `

ttrd06 avatar Jan 17 '18 14:01 ttrd06

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.

kernelsndrs avatar Jan 17 '18 16:01 kernelsndrs

do you have the same issue ? and how to solve it ?

ttrd06 avatar Jan 17 '18 16:01 ttrd06

When I pulled in the fresh unstable branch, yea

kernelsndrs avatar Jan 17 '18 16:01 kernelsndrs

ok and how to pull from master ? To have a working bot ...

ttrd06 avatar Jan 17 '18 16:01 ttrd06

git reset --hard HEAD^ is probably the easiest way to clear changes, and pull everything but the last commit. I've confirmed this works.

kernelsndrs avatar Jan 17 '18 16:01 kernelsndrs

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 ?

ttrd06 avatar Jan 17 '18 16:01 ttrd06

Did you run npm i after resetting your HEAD?

kernelsndrs avatar Jan 17 '18 16:01 kernelsndrs

yes and before i used: rm -rf node_modules because you can't install the bot without this command

ttrd06 avatar Jan 17 '18 17:01 ttrd06

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

ryanb93 avatar Jan 17 '18 17:01 ryanb93

I think I've got a fix, PR incoming.

kernelsndrs avatar Jan 17 '18 17:01 kernelsndrs

Merged, closing.

DeviaVir avatar Jan 17 '18 17:01 DeviaVir