cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

0

I wrote a python script to configure Weblogic Domain. I can see there is an error when im trying to execute with the below lines. I tried debugging with different options and still it is throwing the same error. Please help me out here.

AttributeError: 'NoneType' object has no attribute 'split'

Exporting the Properties to variables.. Problem invoking WLST - Traceback (innermost last): File "/test/wls_domain_creation.py", line 304, in ? File "/test/wls/wls_domain_creation.py", line 61, in export_properties

Here are the lines 61 and 304

machines = _dict.get("machines").split(',') export_properties()

Thanks in advance

Comments
johnmattgrogan
Node Clone

Your NoneType object has no attribute ‘split’ error typically means your provided key is not in the dictionary. The split method would be applied to the string returned from the dictionary. Can you test “machines “ is a key in your _dict?

clem
Graph Steward

The function call:

_dict.get("machines") return the special Python value None instead of a string (meaning the key machine is not in _dict as @johnmattgrogan said.)

You need to do something like:

value = _dict.get("machines")
if value is None:
    # do something reasonable such as:
    machines = [ ] # empty list
else:
   machines = value.split(',')
export_properties()

(Assuming the code downstream can handle an empty list!)

Version history
Last update:
‎05-26-2021 12:28 AM
Updated by:
Contributors