database not recognized #25
SaniHarouna-Mayer
started this conversation in
General
Replies: 2 comments
-
@SaniHarouna-Mayer Sorry for the trouble (and delay - I was traveling). I think this is probably the same as #24 and is probably fixed in the GitHub master branch. I will try to push a release of 4.5.2 later today or tomorrow which should fix this. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@newville |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear all,
I am trying to calculate x-ray attenuations but xraydb doesn't seam to recognize xraydb.sqlite as a valid database. Xraydb was installed via conda-forge, Python verision 3.8.12.
When executing e.g.:
import numpy as np import matplotlib.pyplot as plt from xraydb import mu_elam energy = np.arange(500, 120000, 10) elem = 'C' mu_total = mu_elam(elem, energy, kind='total')
I get following error:
Traceback (most recent call last): File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 1448, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "/Users/admin/Wolke/technical_paper/figures/data/plots.py", line 65, in <module> mu_total = mu_elam(elem, energy, kind='total') File "/Users/admin/anaconda3/envs/stanni/lib/python3.8/site-packages/xraydb/xray.py", line 309, in mu_elam xdb = get_xraydb() File "/Users/admin/anaconda3/envs/stanni/lib/python3.8/site-packages/xraydb/xray.py", line 157, in get_xraydb _xraydb = XrayDB() File "/Users/admin/anaconda3/envs/stanni/lib/python3.8/site-packages/xraydb/xraydb.py", line 84, in __init__ raise ValueError("'%s' is not a valid X-ray Database file!" % dbname) ValueError: '/Users/admin/anaconda3/envs/stanni/lib/python3.8/site-packages/xraydb/xraydb.sqlite' is not a valid X-ray Database file!
Everything seems to be properly downloaded and in place. Any idea how I could solve that issue?
Best,
Sani
Beta Was this translation helpful? Give feedback.
All reactions