Acellera / htmd

HTMD: Programming Environment for Molecular Discovery
https://software.acellera.com/docs/latest/htmd/index.html
Other
253 stars 58 forks source link

Error importing HTMD #1037

Closed danaeko closed 1 year ago

danaeko commented 1 year ago

Dear acellera group, The last three days I was trying to import htmd and I get the following error. The version that I am using is HTMD 2.2.0. The same problem has arised using different versions of HTMD. Do you know how to solve it? Thank you in advance

>>> from htmd.ui import *
2022-10-17 05:09:49,557 - numexpr.utils - INFO - NumExpr defaulting to 8 threads.
Traceback (most recent call last):
  File "/home/debian-user/miniconda3/envs/ace/lib/python3.9/site-packages/requests/models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
  File "/home/debian-user/miniconda3/envs/ace/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/home/debian-user/miniconda3/envs/ace/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/home/debian-user/miniconda3/envs/ace/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/debian-user/miniconda3/envs/ace/lib/python3.9/site-packages/htmd/ui.py", line 80, in <module>
    htmd_registration()
  File "/home/debian-user/miniconda3/envs/ace/lib/python3.9/site-packages/htmdx/cli.py", line 98, in htmd_registration
    if not _check_registration(product):
  File "/home/debian-user/miniconda3/envs/ace/lib/python3.9/site-packages/htmdx/cli.py", line 58, in _check_registration
    status = res.json()
  File "/home/debian-user/miniconda3/envs/ace/lib/python3.9/site-packages/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
giadefa commented 1 year ago

Due to a problem with conda, you need to update to the latest version

On Mon, 17 Oct 2022 at 11:16, danaeko @.***> wrote:

Dear acellera group, The last three days I was trying to import htmd and I get the following error. The version that I am using is HTMD 2.2.0. The same problem has arised using different versions of HTMD. Do you know how to solve it? Thank you in advance

from htmd.ui import * 2022-10-17 05:09:49,557 - numexpr.utils - INFO - NumExpr defaulting to 8 threads. Traceback (most recent call last): File "/home/debian-user/miniconda3/envs/ace/lib/python3.9/site-packages/requests/models.py", line 971, in json return complexjson.loads(self.text, **kwargs) File "/home/debian-user/miniconda3/envs/ace/lib/python3.9/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/home/debian-user/miniconda3/envs/ace/lib/python3.9/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/home/debian-user/miniconda3/envs/ace/lib/python3.9/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "/home/debian-user/miniconda3/envs/ace/lib/python3.9/site-packages/htmd/ui.py", line 80, in htmd_registration() File "/home/debian-user/miniconda3/envs/ace/lib/python3.9/site-packages/htmdx/cli.py", line 98, in htmd_registration if not _check_registration(product): File "/home/debian-user/miniconda3/envs/ace/lib/python3.9/site-packages/htmdx/cli.py", line 58, in _check_registration status = res.json() File "/home/debian-user/miniconda3/envs/ace/lib/python3.9/site-packages/requests/models.py", line 975, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

— Reply to this email directly, view it on GitHub https://github.com/Acellera/htmd/issues/1037, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3KUOSNPKP342K2TUJGUY3WDUKQNANCNFSM6AAAAAARG3QE2Y . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- http://www.acellera.com

   <https://twitter.com/acellera>

https://www.youtube.com/user/acelleracom https://www.linkedin.com/company/2133167?trk=tyah&trkInfo=clickedVertical%3Acompany%2CclickedEntityId%3A2133167%2Cidx%3A2-1-2%2CtarId%3A1448018583204%2Ctas%3Aacellera https://www.acellera.com/md-simulation-blog-news/ http://is.gd/1eXkbS

stefdoerr commented 1 year ago

Yes this looks like a broken conda environment. It's not related to HTMD itself. Create a new conda environment and follow the HTMD installation instructions.

danaeko commented 1 year ago

Thank you for your prompt answers. Indeed, updating conda solved the error

anicoli commented 1 year ago

Dear Accelera,

I also encounter the same problem of @danaeko. We have re-update to the new version of htmd (2.2.0). Everything is working but, after the installation we run from the command line:

htmd_register

then, we import the module for example in ipython, and still htmd re-ask for the registration. We lunch the command htmd_register() that the prompt suggested, and we registered again. Starting a new session of ipython or jupyter-notebook, the message reappear (please see below, restart).

Best, Alessandro

#################

In [1]: from htmd.ui import * 2022-10-18 16:18:38,938 - numexpr.utils - INFO - Note: NumExpr detected 16 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8. 2022-10-18 16:18:38,938 - numexpr.utils - INFO - NumExpr defaulting to 8 threads.

Please cite HTMD: Doerr et al.(2016)JCTC,12,1845. https://dx.doi.org/10.1021/acs.jctc.6b00049 HTMD Documentation at: https://software.acellera.com/htmd/

You are on the latest HTMD version (2.2.0).

Cannot read the registration file Academic License HTMD Software Academic License Agreement v1.1

The HTMD software ("Software") has been developed by the contributing researchers from Acellera and made available through Acellera for your internal, non-profit research use.

Acellera allows researchers at your institution to run, display, copy and modify Software on the following conditions:

  1. The Software remains at your institution and is not published, distributed, or otherwise transferred or made available to other than institution employees and students involved in research under your supervision.

  2. You agree to make results generated using Software available to other academic researchers for non-profit research purposes. If you wish to obtain Software for any commercial purposes, including fee-based service projects, you will need to execute a separate licensing agreement with Acellera and pay a fee. In that case please contact: info@acellera.com.

  3. You retain in Software and any modifications to Software, the copyright, trademark, or other notices pertaining to Software as provided by Acellera.

  4. You provide Acellera with feedback on the use of the Software in your research, and that Acellera are permitted to use any information you provide in making changes to the Software. All bug reports and technical questions shall be sent to the email address: info@acellera.com.

  5. You acknowledge that Acellera and its licensees may develop modifications to Software that may be substantially similar to your modifications of Software, and that Acellera and its licensees shall not be constrained in any way by you in Acellera's or its licensees' use or management of such modifications. You acknowledge the right of Acellera to prepare and publish modifications to Software that may be substantially similar or functionally equivalent to your modifications and improvements, and if you obtain patent protection for any modification or improvement to Software you agree not to allege or enjoin infringement of your patent by Acellera or by any of Acellera's licensees obtaining modifications or improvements to Software from Acellera .

  6. You agree to acknowledge the contribution Software make to your research, and cite appropriate references about the Software in your publications.

  7. Any risk associated with using the Software at your institution is with you and your institution. Software is experimental in nature and is made available as a research courtesy "AS IS," without obligation by Acellera to provide accompanying services or support.

  8. You consent to allow usage information of this software to be sent to Acellera.

  9. ACELLERA EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES REGARDING THE SOFTWARE, WHETHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES PERTAINING TO NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

By continuing to use HTMD you are automatically accepting the above license agreement. For commercial licenses please contact info@acellera.com To remove the above license message please register HTMD by calling htmd_register()

stefdoerr commented 1 year ago

Hi @anicoli . This is a different issue. Are you sure the user which runs htmd_register has a home directory and that you have write access to the home directory? Could you also try running from inside an ipython terminal these two commands:

from htmd.ui import *
htmd_register()

When you run the last command do you get any error like: Registration failed: ....?

Also I should mention that each user on each computer needs to register separately so if it's different users which ran this it makes sense to get the message again.

stefdoerr commented 1 year ago

@anicoli I was able to reproduce the issue. Follow this thread for updates, I hope to fix it today: https://github.com/Acellera/htmd/issues/1038#issuecomment-1285002473

stefdoerr commented 1 year ago

@anicoli it has been fixed now. Thanks for the report

anicoli commented 1 year ago

@stefdoerr, I would say really thank you for your fast reply and the support these weeks.

stefdoerr commented 1 year ago

@anicoli no problem at all! Thank you as well for the issue reports, they are helpful for us as well. I like keeping our software working smoothly :)