NDAR / nda-tools

Python package for interacting with NDA web services. Used to validate, submit, and download data to and from NDA.
MIT License
48 stars 22 forks source link

Error with reading password when it has a % character in it. #24

Open bburnett66 opened 4 years ago

bburnett66 commented 4 years ago

I just started using this software and ran into this error (all personal information removed. It does show my PPI in the error message and I censored it out.

Running NDATools Version 0.2.0
Opening log: /home/MyUsername/NDAValidationResults/debug_log_20200520T170857.txt
Enter your NIMH Data Archives username:MyUsername
Enter your NIMH Data Archives password:
Enter your aws_access_key. If none, hit "Enter:"
Enter your aws_secret_key. If none, hit "Enter":
Traceback (most recent call last):
  File "/home/MyUsername/MyEnv/bin/downloadcmd", line 8, in <module>
    sys.exit(main())
  File "/home/MyUsername/MyEnv/lib/python3.5/site-packages/NDATools/clientscripts/downloadcmd.py", line 69, in main
    config = configure(args.username, args.password)
  File "/home/MyUsername/MyEnv/lib/python3.5/site-packages/NDATools/clientscripts/downloadcmd.py", line 64, in configure
    config.make_config()
  File "/home/MyUsername/MyEnv/lib/python3.5/site-packages/NDATools/Configuration.py", line 88, in make_config
    copy_config.set("User", "password", self.password)
  File "/cm/shared/c3ddb/python/3.5.2/lib/python3.5/configparser.py", line 1190, in set
    super().set(section, option, value)
  File "/cm/shared/c3ddb/python/3.5.2/lib/python3.5/configparser.py", line 891, in set
    value)
  File "/cm/shared/c3ddb/python/3.5.2/lib/python3.5/configparser.py", line 401, in before_set
    "position %d" % (value, tmp_value.find('%')))
ValueError: invalid interpolation syntax in 'MyPasswordWith%Character' at position 11

This was fixed by logging into the nda website and simply changing my password to something without a %

ljchang commented 2 years ago

I experienced the same issue.