LUNA icon indicating copy to clipboard operation
LUNA copied to clipboard

Type error in luna.projects.LocalPorject

Open davidRFB opened this issue 1 year ago • 3 comments

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 avatar Aug 28 '23 17:08 davidRFB

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

davidRFB avatar Aug 29 '23 07:08 davidRFB

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

Anupam-5 avatar Jan 04 '24 08:01 Anupam-5

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

alexandrefassio avatar Apr 02 '24 10:04 alexandrefassio