Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- !pip install pixiedust
- !pip install pixiedust_node
- import pixiedust_node
- npm.install('mysql')
- %%node
- var mysql = require('mysql');
- var dburl = 'database-url.com';
- var con = mysql.createConnection({
- host: dburl,
- user: 'dbuser',
- password: 'dbpassword',
- database: 'dbdatabase'
- });
- con.connect(function(err) {
- if (err) throw err;
- });
- var query ='SELECT user_created_date from user LIMIT 100';
- con.query(query, function (err, result, fields) {
- if (err) throw err;
- console.log(result);
- });
- con.end();
- ... ... ... ... ... TypeError: Converting circular structure to JSON
- at JSON.stringify (<anonymous>)
- at globalVariableChecker (/home/javier/anaconda3/lib/python3.7/site-packages/pixiedust_node/pixiedustNodeRepl.js:26:22)
- at REPLServer.writer (/home/javier/anaconda3/lib/python3.7/site-packages/pixiedust_node/pixiedustNodeRepl.js:67:5)
- at finish (repl.js:683:38)
- at finishExecution (repl.js:310:7)
- at REPLServer.defaultEval (repl.js:396:7)
- at bound (domain.js:395:14)
- at REPLServer.runBound [as eval] (domain.js:408:12)
- at REPLServer.onLine (repl.js:639:10)
- at REPLServer.emit (events.js:182:13)
- /home/javier/anaconda3/lib/python3.7/site- packages/pixiedust_node/pixiedustNodeRepl.js:26
- const j = JSON.stringify(r.context[v]);
- ^
- TypeError: Converting circular structure to JSON
- at JSON.stringify (<anonymous>)
- at Timeout.globalVariableChecker [as _onTimeout] (/home/javier/anaconda3/lib/python3.7/site-packages/pixiedust_node/pixiedustNodeRepl.js:26:22)
- at ontimeout (timers.js:436:11)
- at tryOnTimeout (timers.js:300:5)
- at unrefdHandle (timers.js:520:7)
- at Timer.processTimers (timers.js:222:12)
Add Comment
Please, Sign In to add comment