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

Python 3.11.7 bug on Json read? #172

Closed
shirubana opened this issue May 9, 2024 · 6 comments
Closed

Python 3.11.7 bug on Json read? #172

shirubana opened this issue May 9, 2024 · 6 comments

Comments

@shirubana
Copy link
Member

image

Having trouble opening a Sam-exported SamJson file on the new python.
This works well on Python 3.11.4
It doesn't work on Python 3.11.7 , so suspecting this is the issue.

Info about our system (the one that runs; other one is the same but 3.11.7)
image

This is the journal, SAM file and Jsons we were using to test in both computers
https://github.com/shirubana/pySAMtutorial/tree/main/4%20-%20Passing%20POA%20through%20pySAM

@dguittet
Copy link
Collaborator

dguittet commented May 9, 2024

It looks like it's due to this issue: #164

This issue is fixed but hasn't been released yet.

Modify your code to

try:
  if 'adjust' in k:
           k = k.split('adjust_')[1]
  module.value(k, v)

@shirubana
Copy link
Member Author

Thanks Darice!

This is what I'm getting trying that solution on python 3.11.7, but maybe I'm interpreting it wrong ? @dguittet
image

(btw, it seems it indees was/is related to the python version, the computer that had 3.11.7 we added an environment with 3.11.4 and it worked).

@dguittet
Copy link
Collaborator

dguittet commented May 9, 2024

Can you print the k values that are causing issues?

@shirubana
Copy link
Member Author

image

@dguittet
Copy link
Collaborator

dguittet commented May 9, 2024

Ah, try switching the code to

if 'adjust_` in k:

@shirubana
Copy link
Member Author

sweet, that seem to have worked! thank you for helping us troubleshoot, and sorre we didn't identified that issue as related.

image

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

2 participants