openkim / kim-query

Other
1 stars 0 forks source link

"string indices must be integers" #2

Closed miroi closed 2 weeks ago

miroi commented 3 weeks ago

Hello,

fyi, I took Python example from https://pypi.org/project/kim-query/ and got this error:

python3
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from kim_query import get_lattice_constant_cubic
>>> get_lattice_constant_cubic(["MO_123629422045_005"], ["fcc"], ["Al"], ["angstrom"])
'{"error": "string indices must be integers"}'
>>>
miroi commented 3 weeks ago

I have pip installed package:

pip show kim-query
Name: kim-query
Version: 3.0.0
Summary: Helper routines for querying the OpenKIM Repository
Home-page: https://github.com/openkim/kim-query
Author: Daniel S. Karls
Author-email: karl0100@umn.edu
License: CDDL
Location: /home/milias/.local/lib/python3.10/site-packages
Requires: requests
Required-by:
dskarls commented 3 weeks ago

Similar to #3, believe this was the result of a database connectivity problem on the backend. Can you try again?

miroi commented 2 weeks ago

Hello,

so again, the python script (named as kimpy_example.py) from https://openkim.org/doc/usage/using-models/#Python

gives this error:

python3 kimpy_example.py
Traceback (most recent call last):
  File "/mnt/c/Users/milias/Documents/git-projects/open-collection/theoretical_chemistry/software/openkim/buildup_on_servers/jinr_ru/wsl_win10_pc7321b/kimpy_example/kimpy_example.py", line 33, in <module>
    requestedUnitsAccepted, kim_model, _ = kimpy.model.create(
ValueError: not enough values to unpack (expected 3, got 2)

is this Python script up-to-date please ?

dskarls commented 2 weeks ago

Closing this because it's a kimpy issue unrelated to kim-query and was posted there as #27.