Anaplan Connect 1.4.4 Upload Error

Hello community

 

I try to run Anaplan connect to import data from my local computer with email and password.

But it doesn't work.

I've already set import file as Admins Only.

 

I don't understand just this error **** what is wrong. 

ERROR [c.a.client.Program :650 ] 9204 |-- Anaplan API:

Could you tell me what is wrong?

 

Anaplan connect error.png

bat script

-------------------------------------------------------------------------------------

@Echooff
rem For Windows OS : This example explains the usage of basic Authentication with Anaplan Connect.
rem It also loads a source text file and runs an Anaplan import into a module.
rem For details of how to configure this script visit https://help.anaplan.com/anapedia/Content/Downloads/DL_Downloads.html

set AnaplanUser="email:password"
set WorkspaceId=""
set ModelId=""
set ServiceUrl="https://api.anaplan.com"
set AuthUrl="https://auth.anaplan.com"
set Chunksize="1"


set Operation=-debug -service %ServiceUrl% -auth %AuthUrl% -workspace %WorkspaceId% -model %ModelId% -chunksize %Chunksize% -file "問題37.csv" -put "C:\anaplan-connect\ANY_files\問題37.csv" -import "問題37_import" -execute -output "問題37.csv_dump"
rem *** End of settings - Do not edit below this line ***

setlocal enableextensions enabledelayedexpansion || exit /b 1
cd %~dp0
if not %AnaplanUser% == "" set Credentials=-user %AnaplanUser%
set Command=.\AnaplanClient.bat %Credentials% %Operation%
@Echo%Command%
cmd /c %Command%
pause

Answers

  • NakulAggarwal
    edited December 2022

    Hi @yiseki 

     

    Just wanted to know is the script in the same folder where you have downloaded the Anaplan API ?

     

    Thanks,

  • yiseki
    edited December 2022

    YES.

    I placed folder of Anaplan-connect under the C drive like this below.

    And the script is in its folder that is drawn red line . 

    Anaplan connect reply1.png

     

  • NakulAggarwal
    edited December 2022

    Hi @yiseki 

     

    Apologies, Are you running the script on Linux , Mac OS or Windows ?

     

    Because i see the starting of the script is starting as Windows but in middle is it Mac OS and Linux. 

     

    Can you confirm ?

     

    Thanks,

    Nakul

  • yiseki
    edited December 2022

    @NakulAggarwal 

     

    I am running the script only on Windows.

     

    I'm so sorry that I didn't arrange files.

    It makes you confuse...

     

    thanks,

    yiseki

     

  • NakulAggarwal
    edited December 2022

    Hi @yiseki 

     

    please try the below script between the dotted line:- 

     

    Please double check the file name and Import name in your local language and update Email/Password/WorkspaceID/ModelID:-

     

    -------------------------------------------------------------------------------------

    @Echo off
    rem This example loads a source text file and runs an Anaplan import into a module.
    rem For details of how to configure this script see doc\Anaplan Connect User Guide.doc

    set AnaplanUser="email:password"
    set WorkspaceId=""
    set ModelId=""
    set Operation=-service "https://api.anaplan.com" -auth "https://auth.anaplan.com"
    -file "問題37.csv" -put "C:\anaplan-connect\ANY_files\問題37.csv" -import "問題37_import" -execute
    -output "C:\anaplan-connect\My Errors.txt" 

    rem *** End of settings - Do not edit below this line ***
    setlocal enableextensions enabledelayedexpansion || exit /b 1
    cd %~dp0

    if not %AnaplanUser% == "" set Credentials=-user %AnaplanUser%
    set Command=.\AnaplanClient.bat %Credentials% -workspace %WorkspaceId% -model %ModelId% %Operation%
    @Echo %Command%
    cmd /c %Command%
    pause

    -------------------------------------------------------------------------------------

     

    Do let me know if you still face some issue.

     

    Thanks,

    Nakul

     

  • yiseki
    edited December 2022

    hello@NakulAggarwal 

     

    Thank you for sharing the scripts!

     

    I checked email:password and model ID, workspace ID.

    THEN I tried to run it.

     

    But I faced same error.
    Do you have any idea why the error is occurred?

    yiseki_0-1592992756476.png

     

    Thanks,

    yiseki

  • ABerenguela
    edited December 2022

    Hi,

    I guess it is an issue with the character encoding, try saving your batch file in UTF-8

    Also Run that batch file in code page 65001.

     

    Regards

  • yiseki
    edited December 2022

    HELLO@ABerenguela 

     

    I tried to save batch file in UTF-8.

    And changed code page 65001 in console.

    Beside,I also tried to save AnaplanClient.bat in UTF-8.

     

     

    I faced same issue.

    yiseki_0-1593047349902.png

     

     

    Regards,

    yiseki

  • NakulAggarwal
    edited December 2022

    Hi @yiseki 

     

    My team was trying the same on one of the servers and they faced the same issue, they resolved it by adding the a proxy in the script :-

     

    .............................................................

     

    @Echo off
    rem This example loads a source text file and runs an Anaplan import into a module.
    rem For details of how to configure this script see doc\Anaplan Connect User Guide.doc

    set AnaplanUser="email:password"
    set WorkspaceId=""
    set ModelId=""
    set Operation=-service "https://api.anaplan.com" -auth "https://auth.anaplan.com"

     

    -via "PROXY:PORT" -file "問題37.csv" -put "C:\anaplan-connect\ANY_files\問題37.csv" -import "問題37_import" -execute
    -output "C:\anaplan-connect\My Errors.txt" 

     

    rem *** End of settings - Do not edit below this line ***
    setlocal enableextensions enabledelayedexpansion || exit /b 1
    cd %~dp0

    if not %AnaplanUser% == "" set Credentials=-user %AnaplanUser%
    set Command=.\AnaplanClient.bat %Credentials% -workspace %WorkspaceId% -model %ModelId% %Operation%
    @Echo %Command%
    cmd /c %Command%
    pause

     

    .................................

     

    If you can try this once by adding a proxy and Port in the script.

     

    Thanks,

    Nakul

  • yiseki
    edited December 2022

    HELLO@NakulAggarwal 

     

    Thank you for trying find out the way to resolve the issue.

    I have a question about adding the a proxy.

    To add the a proxy in the script, should I need to setup my local firewall rule?

    I don't know what to add so I don't set up any rules for Anaplan connect.

     

    thanks,

    yiseki

  • ben_speight
    edited December 2022

    Can you try passing the numeric file ID with -file instead of the name, and the numeric import ID with -import instead of the name? You should be able to retrieve these by listing them with -files and -imports.

  • NakulAggarwal
    edited December 2022

    HI @yiseki 

     

    Great to hear that solution worked for you. You mark it as resolved.

     

    In my case i was facing issue that script was on client server and without a proxy the Anaplan Connect API was not able to connect to Anaplan. We used the proxy specific to that system where script is stored and not the local machine.

     

    If you are doing it on client server, they can provide you the same.

     

    Thanks,

    Nakul

  • yiseki
    edited December 2022

    hello@ben_speight

     

    thank you for telling your solution.

    I tried to change name to numeric name without Japanese character as you say.

    I confirm that it works.

     

    Actually,I need to know about when I upload files with Japanese character.

     

    thanks,

    yiseki

  • schulze
    edited December 2022

    I know this thread is old, but I don't see my particular issue behind error 650 in community, so I thought I'd post my resolution here.

     

    I have received the same 650 error when attempting to use an SSO ID with basic authentication.  I switched to an exception user (non-SSO) and the error went away.  From the AC 1.4.4 guide: "If you use Anaplan’s Basic authentication, the Anaplan Connect ... user must be an Exception User".

  • Shailendr
    edited December 2022
    HI Ben ,
    Hope you are doing great!
    Looking for your Kind Advice ..
    Actually , I am working with Anaplan Connect to Import/Export files from server. Due to Security policy my client is not willing to Whitelist below both services.

    api.anaplan.com & auth.anaplan.com . where as they are suggesting to use proxy and port in my Script .
    or
    Data Power path
    Anaplan Connect -> www.XXXX.ws.ABC.com/API & www.XXXX.ws.ABC.com/AUTH -> api.anaplan.com & auth.anaplan.com
    - No proxy config

    Can we use a different url like www.XXXX.ws.ABC.com/API instead of api.anplan.com in the script. The URL www.XXXX.ws.ABC.com/API will convert to api.anaplan.com when it hits the internet.
  • ben_speight
    edited December 2022

    If you specify a proxy URL using the "-via" option, Anaplan Connect will create a tunnelled connection through that proxy. Some proxies require authentication, and there is an additional option to pass credentials.

  • Dheeraj09
    edited December 2022
    Hi Yiseki, I am facing a Similar error, Did you find any solution for this?