The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Twitter connection problem

sgenzersgenzer Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM Moderator Posts: 2,959 Community Manager
edited November 2018 in Help

Hi...trying to build a twitter connection on RM Server 7.4 and I keep getting an error.  Here's what I did:

- Added a Twitter connection on my server from the RM Studio "Add connection" interface.

- Tested with success.

- Added "admin" as user

- Save all changes.

- Logged into RM Server and went to Connections.  The token is already pasted into the access_token window.  When I click "Test Connection Parameters", I get "Test failed: Twitter API access token has incorrect format"

- Tried deleting the token and then literally copying and pasting the token manually from Studio to Server - same result.

 

Help?

 

Thanks.

Scott 

Tagged:

Best Answer

  • Edin_KlapicEdin_Klapic Employee-RapidMiner, RMResearcher, Member Posts: 299 RM Data Scientist
    Solution Accepted

    When reproducing your problem I managed to fix it by setting the permissions for this connection.

    Would you please check if they are set on your machine?

     

    Another question which might also be interesting here: How did you trigger this process?

    From Studio by clicking on "Execute on Server" or from the Server Webinterface?

     

    Best,

    Edin

Answers

  • Edin_KlapicEdin_Klapic Employee-RapidMiner, RMResearcher, Member Posts: 299 RM Data Scientist

    Hi Scott,

     

    sometimes there is an issue when it comes to setting access rights for Server connections from within Studio.

    Would you please delete the connection and set it up within the Webinterface of RapidMiner Server, set the permissions there and test it.

    If you get an error as well would you mind providing the log file for this event?

     

    Best,

    Edin

  • sgenzersgenzer Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM Moderator Posts: 2,959 Community Manager

    Hi Edin -

     

    I'd be happy to...can you please explain how to do this exclusively from the web interface?  All I can see is a space to insert the token cut from RM Studio:

     

    Screen Shot 2017-05-24 at 9.44.29 AM.png

  • Edin_KlapicEdin_Klapic Employee-RapidMiner, RMResearcher, Member Posts: 299 RM Data Scientist

    Hi Scott,

     

    my bad :|

    I did not create a Twitter connection in a while. Do you still have the token somewhere around? Otherwise create this Twitter connection on and for your local machine and copy the token then into the Web interface, hit Submit and test the connection.

     

    Best,

    Edin

  • sgenzersgenzer Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM Moderator Posts: 2,959 Community Manager

    No worries.  Yes that is exactly what I did - created the token in Studio (which works fine) and then pasted it into Server.  No good.  Next idea?

  • Edin_KlapicEdin_Klapic Employee-RapidMiner, RMResearcher, Member Posts: 299 RM Data Scientist

    Hi Scott,

    sorry for the delay - We had a public holiday in Germany :)

     

    I tried to reproduce the problem and it worked. Thus I realized that you need to hit Submit before you can Test the connection - otherwise it failed for me as well.

    Are you running other extensions which work connecting with access tokens, so we can therefore narrow it down to the Twitter connection?

     

    Best,

    Edin

  • sgenzersgenzer Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM Moderator Posts: 2,959 Community Manager

    No problem, Edin.  We're on holiday this weekend too.  :)

     

    I tried it all again from scratch just now and RM Server confirmed that it made a connection with Twitter (green "Connection successful") in the Connections window.  But running a process with Twitter and that connection still fails.  Here's the log file:

     

    18:36:17,008 INFO  [com.rapidminer.Process.16] (scheduledprocess_1495823776993) Process //_LOCAL/projects/ExchangeRates/Twitter import starts
    18:36:17,011 SEVERE [com.rapidminer.Process.16] (scheduledprocess_1495823776993) Process failed: com.rapidminer.operator.UserError: Error on connecting to Twitter API.: com.rapidminer.operator.UserError: Error on connecting to Twitter API.
    at com.rapidminer.operator.web.services.twitter.AbstractTwitterOperator.getTwitter(AbstractTwitterOperator.java:99)
    at com.rapidminer.operator.web.services.twitter.AbstractStatusTwitterOperator.createExampleSet(AbstractStatusTwitterOperator.java:139)
    at com.rapidminer.operator.io.AbstractExampleSource.read(AbstractExampleSource.java:49) [rapidminer-studio-core-7.4.0.jar:7.4.0]
    at com.rapidminer.operator.io.AbstractExampleSource.read(AbstractExampleSource.java:33) [rapidminer-studio-core-7.4.0.jar:7.4.0]
    at com.rapidminer.operator.io.AbstractReader.doWork(AbstractReader.java:126) [rapidminer-studio-core-7.4.0.jar:7.4.0]
    at com.rapidminer.operator.Operator.execute(Operator.java:1005) [rapidminer-studio-core-7.4.0.jar:7.4.0]
    at com.rapidminer.operator.execution.SimpleUnitExecutor.execute(SimpleUnitExecutor.java:77) [rapidminer-studio-core-7.4.0.jar:7.4.0]
    at com.rapidminer.operator.ExecutionUnit$3.run(ExecutionUnit.java:812) [rapidminer-studio-core-7.4.0.jar:7.4.0]
    at com.rapidminer.operator.ExecutionUnit$3.run(ExecutionUnit.java:807) [rapidminer-studio-core-7.4.0.jar:7.4.0]
    at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_121]
    at com.rapidminer.operator.ExecutionUnit.execute(ExecutionUnit.java:807) [rapidminer-studio-core-7.4.0.jar:7.4.0]
    at com.rapidminer.operator.OperatorChain.doWork(OperatorChain.java:428) [rapidminer-studio-core-7.4.0.jar:7.4.0]
    at com.rapidminer.operator.Operator.execute(Operator.java:1005) [rapidminer-studio-core-7.4.0.jar:7.4.0]
    at com.rapidminer.Process.run(Process.java:1205) [rapidminer-studio-core-7.4.0.jar:7.4.0]
    at com.rapidminer.Process.run(Process.java:1101) [rapidminer-studio-core-7.4.0.jar:7.4.0]
    at com.rapidminer.Process.run(Process.java:1054) [rapidminer-studio-core-7.4.0.jar:7.4.0]
    at com.rapidminer.Process.run(Process.java:1049) [rapidminer-studio-core-7.4.0.jar:7.4.0]
    at de.rapidanalytics.execution.AbstractProcessExecutor.runProcessNow(AbstractProcessExecutor.java:91) [rapidminer-server-ejb.jar:]
    at de.rapidanalytics.execution.SimpleProcessExecutor.execute(SimpleProcessExecutor.java:31) [rapidminer-server-ejb.jar:]
    at de.rapidanalytics.execution.ProcessExecutionDispatcher$ProcessRunnable.run(ProcessExecutionDispatcher.java:89) [rapidminer-server-ejb.jar:]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_121]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_121]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_121]
    Caused by: java.lang.IllegalArgumentException: Twitter API access token is not set.
    at com.rapidminer.operator.web.services.twitter.oauth.TwitterOAuth.getTwitterApi(TwitterOAuth.java:110)
    at com.rapidminer.operator.web.services.twitter.oauth.TwitterConnection.getTwitterApi(TwitterConnection.java:61)
    at com.rapidminer.operator.web.services.twitter.AbstractTwitterOperator.getTwitter(AbstractTwitterOperator.java:97)
    ... 22 more

    18:36:17,015 SEVERE [com.rapidminer.Process.16] (scheduledprocess_1495823776993) Here: Process[1] (Process)
    subprocess 'Main Process'
    +- Subprocess (2)[0] (Subprocess)
    subprocess 'Nested Process'
    | +- Create Document (2)[0] (Create Document)
    | +- Documents to Data (2)[0] (Documents to Data)
    | +- Execute Script[0] (Execute Script)
    | +- Extract Macro[0] (Extract Macro)
    | +- Generate Data by User Specification[0] (Generate Data by User Specification)
    | +- Enrich Data by Webservice (2)[0] (Enrich Data by Webservice)
    | +- Extract Macro (2)[0] (Extract Macro)
    +- Subprocess[0] (Subprocess)
    subprocess 'Nested Process'
    | +- Create Document[0] (Create Document)
    | +- Documents to Data[0] (Documents to Data)
    | +- Encode URLs[0] (Encode URLs)
    +- Enrich Data by Webservice[0] (Enrich Data by Webservice)
    ==> +- Search Twitter[1] (Search Twitter)
    +- Retrieve Twitter[0] (Retrieve)
    +- Append[0] (Append)
    +- Remove Duplicates[0] (Remove Duplicates)
    +- Sort[0] (Sort)

    The issue seems to be that the token does not get saved properly.  When I go BACK to the Connections window and click "Test Connection" again, I get an error:

     

    Screen Shot 2017-05-26 at 2.41.29 PM.png

     

    Scott

  • sgenzersgenzer Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM Moderator Posts: 2,959 Community Manager

    OK I don't know quite how I did it but with your help I got it working - finally!  Rather quirky.  Thanks, Edin.


    Scott

Sign In or Register to comment.