-
Notifications
You must be signed in to change notification settings - Fork 5
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
Error message on running ./runSModelS.py #34
Comments
Hey Juhi,
long time no see! The error is an issue with pyhf, the code reads
if sys.version_info >= (3, 9):
from importlib import resources
else:
import importlib_resources as resources
Is there any way you can just use a python version >= 3.9?
If you really need python 3.7 and pyhf and you have the latest
importlib_resources module,
then I suggest contacting the pyhf team about this.
Cheers
Wolfgang
…On Wed, Aug 30, 2023 at 9:34 PM juhidutta ***@***.***> wrote:
Dear experts,
I am currently using SModelS Release v2.3.1. While I have successfully
installed it on centos7 system, I encounter the following error on running
./runSModelS.py -h:
Traceback (most recent call last):
File "./runSModelS.py", line 3, in
from smodels.tools.runSModelS import main
File "/raid05/users/jdutta/smodels-main/smodels/tools/runSModelS.py", line
12, in
from smodels.tools import modelTester
File "/raid05/users/jdutta/smodels-main/smodels/tools/modelTester.py",
line 16, in
from smodels.theory import theoryPrediction
File
"/raid05/users/jdutta/smodels-main/smodels/theory/theoryPrediction.py",
line 16, in
from smodels.tools.statsTools import StatsComputer
File "/raid05/users/jdutta/smodels-main/smodels/tools/statsTools.py", line
20, in
from smodels.tools.pyhfInterface import PyhfData, PyhfUpperLimitComputer
File "/raid05/users/jdutta/smodels-main/smodels/tools/pyhfInterface.py",
line 41, in
import pyhf
File "/home/jdutta/.local/lib/python3.7/site-packages/pyhf/*init*.py",
line 7, in
from pyhf.pdf import Model
File "/home/jdutta/.local/lib/python3.7/site-packages/pyhf/pdf.py", line
11, in
from pyhf import schema
File "/home/jdutta/.local/lib/python3.7/site-packages/pyhf/schema/*init*.py",
line 6, in
from pyhf.schema.loader import load_schema
File
"/home/jdutta/.local/lib/python3.7/site-packages/pyhf/schema/loader.py",
line 5, in
from pyhf.schema import variables
File
"/home/jdutta/.local/lib/python3.7/site-packages/pyhf/schema/variables.py",
line 9, in
schemas = resources.files('pyhf') / "schemas"
AttributeError: module 'importlib_resources' has no attribute 'files'
Could you please kindly advise how I may resolve this error?
Best regards,
Juhi
—
Reply to this email directly, view it on GitHub
<#34>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABLSE42GV7CRTBT3KECEZBDXX6IUFANCNFSM6AAAAAA4E76UVI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hi Wolfgang,
Thank you for your response.
I will upgrade importlib_resources and retry again on the cluster.
Meanwhile, it runs successfully on a Ubuntu system.
With best regards,
Juhi
On Thu, Aug 31, 2023 at 3:28 PM Wolfgang Waltenberger <
***@***.***> wrote:
… Hey Juhi,
long time no see! The error is an issue with pyhf, the code reads
if sys.version_info >= (3, 9):
from importlib import resources
else:
import importlib_resources as resources
Is there any way you can just use a python version >= 3.9?
If you really need python 3.7 and pyhf and you have the latest
importlib_resources module,
then I suggest contacting the pyhf team about this.
Cheers
Wolfgang
On Wed, Aug 30, 2023 at 9:34 PM juhidutta ***@***.***> wrote:
> Dear experts,
>
> I am currently using SModelS Release v2.3.1. While I have successfully
> installed it on centos7 system, I encounter the following error on
running
> ./runSModelS.py -h:
>
> Traceback (most recent call last):
> File "./runSModelS.py", line 3, in
> from smodels.tools.runSModelS import main
> File "/raid05/users/jdutta/smodels-main/smodels/tools/runSModelS.py",
line
> 12, in
> from smodels.tools import modelTester
> File "/raid05/users/jdutta/smodels-main/smodels/tools/modelTester.py",
> line 16, in
> from smodels.theory import theoryPrediction
> File
> "/raid05/users/jdutta/smodels-main/smodels/theory/theoryPrediction.py",
> line 16, in
> from smodels.tools.statsTools import StatsComputer
> File "/raid05/users/jdutta/smodels-main/smodels/tools/statsTools.py",
line
> 20, in
> from smodels.tools.pyhfInterface import PyhfData, PyhfUpperLimitComputer
> File "/raid05/users/jdutta/smodels-main/smodels/tools/pyhfInterface.py",
> line 41, in
> import pyhf
> File "/home/jdutta/.local/lib/python3.7/site-packages/pyhf/*init*.py",
> line 7, in
> from pyhf.pdf import Model
> File "/home/jdutta/.local/lib/python3.7/site-packages/pyhf/pdf.py", line
> 11, in
> from pyhf import schema
> File
"/home/jdutta/.local/lib/python3.7/site-packages/pyhf/schema/*init*.py",
> line 6, in
> from pyhf.schema.loader import load_schema
> File
> "/home/jdutta/.local/lib/python3.7/site-packages/pyhf/schema/loader.py",
> line 5, in
> from pyhf.schema import variables
> File
>
"/home/jdutta/.local/lib/python3.7/site-packages/pyhf/schema/variables.py",
> line 9, in
> schemas = resources.files('pyhf') / "schemas"
> AttributeError: module 'importlib_resources' has no attribute 'files'
>
> Could you please kindly advise how I may resolve this error?
>
> Best regards,
> Juhi
>
> —
> Reply to this email directly, view it on GitHub
> <#34>, or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/ABLSE42GV7CRTBT3KECEZBDXX6IUFANCNFSM6AAAAAA4E76UVI>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#34 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHNKT6QHSRE6ZB47RY4YHK3XYBN25ANCNFSM6AAAAAA4E76UVI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dear experts,
I am currently using SModelS Release v2.3.2 (the zip version from github). While I have successfully installed it on centos7 system, I encounter the following error on running ./runSModelS.py -h:
Traceback (most recent call last):
File "./runSModelS.py", line 3, in
from smodels.tools.runSModelS import main
File "/raid05/users/jdutta/smodels-main/smodels/tools/runSModelS.py", line 12, in
from smodels.tools import modelTester
File "/raid05/users/jdutta/smodels-main/smodels/tools/modelTester.py", line 16, in
from smodels.theory import theoryPrediction
File "/raid05/users/jdutta/smodels-main/smodels/theory/theoryPrediction.py", line 16, in
from smodels.tools.statsTools import StatsComputer
File "/raid05/users/jdutta/smodels-main/smodels/tools/statsTools.py", line 20, in
from smodels.tools.pyhfInterface import PyhfData, PyhfUpperLimitComputer
File "/raid05/users/jdutta/smodels-main/smodels/tools/pyhfInterface.py", line 41, in
import pyhf
File "/home/jdutta/.local/lib/python3.7/site-packages/pyhf/init.py", line 7, in
from pyhf.pdf import Model
File "/home/jdutta/.local/lib/python3.7/site-packages/pyhf/pdf.py", line 11, in
from pyhf import schema
File "/home/jdutta/.local/lib/python3.7/site-packages/pyhf/schema/init.py", line 6, in
from pyhf.schema.loader import load_schema
File "/home/jdutta/.local/lib/python3.7/site-packages/pyhf/schema/loader.py", line 5, in
from pyhf.schema import variables
File "/home/jdutta/.local/lib/python3.7/site-packages/pyhf/schema/variables.py", line 9, in
schemas = resources.files('pyhf') / "schemas"
AttributeError: module 'importlib_resources' has no attribute 'files'
Could you please kindly advise how I may resolve this error?
Best regards,
Juhi
The text was updated successfully, but these errors were encountered: