question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect updating of parameters

See original GitHub issue

An evil, sneaky bug that we introduced with the Cerberus refactoring. For the leap parameters, we are using the schema:

_LEAP_PARAMETERS_DEFAULT_SCHEMA = {'leap': {
    'required': False,
    'type': 'dict',
    'schema': _LEAP_PARAMETERS_SCHEMA,
    'default': {'parameters': []}}  # Default for if the parameter is missing
}

so we are assigning the same list object to every molecule by default. This means, for example, that after adding the antechamber frcmod file to the list of parameters of a molecule, we are effectively adding the same frcmod file to every molecule.

I’m thinking of switching to use a default_setter that creates a new list every time.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Lnadencommented, Dec 5, 2017

I think there are a couple other mutables in the schema, but they are wrapped in function calls so they get rebuilt per call anyways. This problem would also go away when we put in #824 i imagine, but there is no timeline for that so this should be fixed now

0reactions
andrrizzicommented, Dec 5, 2017

Not a copy of the whole schema per se, but a copy of the default value {'parameters': []}} since it’s a mutable type. I think that’s the only instance in which we use a mutable type as a default value based on a quick scan anyway.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix the Parameter Is Incorrect on External Hard Drive ...
Fix 3: Run SFC Scan​​ The issue that external hard drive parameter is incorrect most commonly occurs when system files are missing or...
Read more >
Fix The Parameter Is Incorrect on External Hard Drive in ...
'The parameter is incorrect' is an error that usually occurs in Windows 10/8/7 and prevents you from opening the device and accessing your...
Read more >
How to Fix "The Parameter Is Incorrect" Error in Windows
1. Perform a Quick Scan Check · 2. Run Chkdsk to Fix Drive Errors · 3. Run sfc/scannow on External Drive · 5....
Read more >
Error message "Update available. The parameter is incorrect"
I have run the various cleaners (CCleaner, AdwCleaner, PrivaZer, MS Disk Cleanup, Wise Care 365), on-demand AV tools (incl. MBAM), and other ...
Read more >
"The Parameter is Incorrect" on External Hard Drive: How to Fix
Solution #5: Check the Decimal Symbol Settings ... Oddly enough, the decimal symbol used by Windows can cause this issue to arise. It's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found