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

Type error in luna.projects.LocalPorject #46

Open
davidRFB opened this issue Aug 28, 2023 · 3 comments
Open

Type error in luna.projects.LocalPorject #46

davidRFB opened this issue Aug 28, 2023 · 3 comments

Comments

@davidRFB
Copy link

Dear all,

Thanks for this amazing package ! I am trying to reproduce the tutorial but running this line :

luna.projects.LocalProject(**opts)

ypeError                                 Traceback (most recent call last)
/tmp/ipykernel_738485/328268586.py in 
----> 1 luna.projects.LocalProject(**opts)

[~/mambaforge/envs/luna-env/lib/python3.7/site-packages/luna/projects.py](https://vscode-remote+ssh-002dremote-002b10-002e245-002e85-002e25.vscode-resource.vscode-cdn.net/home/dafigueroa%40iit.local/Polymerases/B2_Descriptor_Polymerases/04_TempWork/tutorial/~/mambaforge/envs/luna-env/lib/python3.7/site-packages/luna/projects.py) in __init__(self, entries, working_path, **kwargs)
   1122 
   1123     def __init__(self, entries, working_path, **kwargs):
-> 1124         super().__init__(entries=entries, working_path=working_path, **kwargs)
   1125 
   1126     def _process_entry(self, entry):

TypeError: __init__() got an unexpected keyword argument 'mol_obj_type'

I just execute all the cells as they are in the original file.
I was wondering if maybe is a new change from the version0.12 to 0.13.

Best
David

@davidRFB
Copy link
Author

small update:
Commenting the opt['mol_obj_type'] in the opt dictionary allow the calculation run without problem

@Anupam-5
Copy link

Anupam-5 commented Jan 4, 2024

Dear David,

I am encountering the same error can you please elaborate the solution, where do I have to make the changes to run the calculations.

Thanks and regards
Anupam

small update: Commenting the opt['mol_obj_type'] in the opt dictionary allow the calculation run without problem

@alexandrefassio
Copy link
Contributor

Thanks @davidRFB and @Anupam-5 for letting me know about this issue.

I've just made a commit to solve the problem.

If you download LUNA again from git, @Anupam-5, you should not see these errors anymore. In any case, you may also achieve the same results if you remove 'mol_obj_type' when defining a new args dictionary. This parameter has been removed from LUNA recently.

For example, in old versions you may see some code like this:

  opts = {}
  
  opts['entries'] = entries
  opts['working_path'] = "./outputs/luna_results"
  opts['pdb_path'] = "./inputs"
  opts['overwrite_path'] = False
  opts['amend_mol'] = True
  
  opts['mol_obj_type'] = 'rdkit'

So, you just need to remove the highlighted line from any codes you have. In tutorial # 1, for example, the section you need to modify comes after the cell Setting up parameters.

Let me know if this works for you.

bests

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

3 participants