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

register_sdf TypeError #134

Open
amyrask opened this issue May 31, 2023 · 0 comments
Open

register_sdf TypeError #134

amyrask opened this issue May 31, 2023 · 0 comments

Comments

@amyrask
Copy link

amyrask commented May 31, 2023

  • acasclient version:
  • Python version: 3.10.9
  • Operating System: macOS Ventura 13.3.1

Description

Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.

What I Did

When I try to register an sdf I get a TypeError. If I check the response variable on acasclient.py line 1066 the response is a string: 'Error'.

test = acasclient.client({'username': 'myusername', 'password': 'mypassword', 'url': 'https://myinstance.com/'})
response = test.register_sdf(filepath, 'myusername', MAPPING, prefix='CMPD', dry_run=True)

Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.

TypeError Traceback (most recent call last)
Cell In[28], line 1
----> 1 response = test.register_sdf(filepath, 'myusername', MAPPING, prefix='CMPD', dry_run=True)

File ~/miniconda3/envs/env/lib/python3.10/site-packages/acasclient/acasclient.py:1068, in client.register_sdf(self, file, userName, mappings, prefix, dry_run)
1066 response = self.register_sdf_request(request)
1067 report_files = []
-> 1068 for file in response[0]['reportFiles']:
1069 filePath = "/dataFiles/cmpdreg_bulkload/{}".format(
1070 PurePath(Path(file)).name)
1071 report_files.append(self.get_file(filePath))

TypeError: string indices must be integers

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

1 participant