Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

%%scala directive not found in notebooks in DSX #2

Open
gopikris opened this issue Mar 26, 2017 · 1 comment
Open

%%scala directive not found in notebooks in DSX #2

gopikris opened this issue Mar 26, 2017 · 1 comment

Comments

@gopikris
Copy link

I pasted the below code in a DSX notebook in one cell and got %%scala not found. Then I separated it out into 3 cells and scala directive error was gone but I got this below error. Can you please help ?

pixiedustRunner.scala:38: error: object cds is not a member of package com.ibm
val demo = com.ibm.cds.spark.samples.PixiedustStreamingTwitter
^
one error found

import pixiedust

twitterConsumerKey = ""
twitterConsumerSecret = ""
twitterAccessToken = ""
twitterAccessTokenSecret = ""
toneAnalyzerPassword = ""
toneAnalyzerUserName = ""

%%scala
val demo = com.ibm.cds.spark.samples.PixiedustStreamingTwitter
demo.setConfig("twitter4j.oauth.consumerKey",twitterConsumerKey)
demo.setConfig("twitter4j.oauth.consumerSecret",twitterConsumerSecret)
demo.setConfig("twitter4j.oauth.accessToken",twitterAccessToken)
demo.setConfig("twitter4j.oauth.accessTokenSecret",twitterAccessTokenSecret)
demo.setConfig("watson.tone.url","https://gateway.watsonplatform.net/tone-analyzer/api")
demo.setConfig("watson.tone.password",toneAnalyzerPassword)
demo.setConfig("watson.tone.username",toneAnalyzerUserName)
demo.setConfig("checkpointDir", System.getProperty("user.home") + "/pixiedust/ssc")

from pixiedust_twitterdemo import *

twitterDemo()

@DTAIEB
Copy link
Member

DTAIEB commented Mar 27, 2017

@gopikris before further diagnosing, a few steps I want to make sure you followed when running the notebook

  1. After installing the jar with pixiedust.installPackage api, you need to restart the kernl
  2. Every time you restart a kernel, all cells have to be run again.
  3. Make sure to fill out the credentials. Not sure from above if you left them empty for the sake of this post or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants