Unable to display children error resolving variables traceback most recent call last

When using the API (1.8.2) to create a user in AGOL, it throws an exception only indicating userType. On further investigation seems that when trying to query the user_settings it can't find th...

I am still getting the errors, both with the sample program I sent, and with the full program. Here is the full trace from the userType keyerror.

Unable to display children:Error resolving variables Traceback (most recent call last):
File «D:/OneDrive/Esri/Scripts/Python/AGOL_Bulk_Users/AGOL_Bulk_Users.py», line 187, in CreateUser
groups = group
File «C:Program FilesArcGISProbinPythonenvsarcgispro-py3libsite-packagesarcgisgis_init_.py», line 2275, in create
return self.create64plus(**params)
File «C:Program FilesArcGISProbinPythonenvsarcgispro-py3libsite-packagesarcgisgis_init
.py», line 2584, in _create64plus
if not self.user_settings[‘userType’] == ‘arcgisonly’:
KeyError: ‘userType’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File «C:Program FilesJetBrainsPyCharm Community Edition 2019.1.3pluginspython-cehelperspydev_pydevd_bundlepydevd_resolver.py», line 213, in resolve
return dict[key]
KeyError: ‘KeyError’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File «C:Program FilesJetBrainsPyCharm Community Edition 2019.1.3pluginspython-cehelperspydev_pydevd_bundlepydevd_comm.py», line 1232, in do_it
_typeName, val_dict = pydevd_vars.resolve_compound_variable_fields(self.thread_id, self.frame_id, self.scope, self.attributes)
File «C:Program FilesJetBrainsPyCharm Community Edition 2019.1.3pluginspython-cehelperspydev_pydevd_bundlepydevd_vars.py», line 282, in resolve_compound_variable_fields
var = getVariable(thread_id, frame_id, scope, attrs)
File «C:Program FilesJetBrainsPyCharm Community Edition 2019.1.3pluginspython-cehelperspydev_pydevd_bundlepydevd_vars.py», line 240, in getVariable
var = resolver.resolve(var, k)
File «C:Program FilesJetBrainsPyCharm Community Edition 2019.1.3pluginspython-cehelperspydev_pydevd_bundlepydevd_resolver.py», line 215, in resolve
return getattr(dict, key)
AttributeError: ‘dict’ object has no attribute ‘KeyError’

Hi,

I am using LDAP3 to retrieve every computer in my domain.

from ldap3 import Server, Connection, ALL
ad_computer_list = []


# Procedure to get AD computers
def get_ad_computers():
    search_domain = ('dc=uk,dc=co,dc=uk')
    search_user = ('CN=Lady DAP,OU=mc_u_service_,OU=mc,DC=uk,DC=co,DC=uk')
    search_password = ('password')
    # Set connection to LDAP Server
    ldap_server = Server('10.0.1.2', port = 636, use_ssl = True, get_info=ALL)
    server_query = Connection(ldap_server, search_user, search_password, auto_bind=True)
    #Check to see if you can connect on 636
    if server_query.bind() == True:
        #print(ldap_server.info)
        server_query.search(search_domain, '(objectclass=computer)')
        #server_query.search(search_domain, '(&(objectclass=computer)(name=*))')
        computer_names = server_query.entries
        print(server_query.entries)
    else:
        server_query.search(search_domain, '(objectclass=computer)')
        computer_name = server_query.entries
        print("389: ",computer_name)

It finds all the machines for me, but when I debug the list, it would seem it is not a proper list. It doesn’t have a len value. I just want the computer name to compare to another list.

The error is

Unable to display children:Error resolving variables Traceback (most recent call last):
File «/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_comm.py», line 1208, in do_it
xml.write(pydevd_xml.var_to_xml(val, k, evaluate_full_value=evaluate_full_value))
File «/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_xml.py», line 369, in var_to_xml
elif hasattr(v, «__len__») and not is_string(v):
File «/Users/sm/Documents/_personal files/Folder/Python/GitHub/venv/lib/python3.8/site-packages/ldap3/abstract/entry.py», line 196, in __getattr__
raise LDAPCursorError(error_message)
ldap3.core.exceptions.LDAPCursorError: attribute ‘__len__’ not found

What can I do to avoid this?

Best wishes

Michael

Debugging with PyCharm (happens on multiple versions) I’m unable to correctly view some lists and dictionaries (other are presented correctly).
In the view window the object’s name is presented with the message:
{list} Unable to get repr for <type 'list>
or
{dict} Unable to get repr for <type 'dict'>

An update:
In one of my attempts, I received the following message from the debugger (presented instead of the value of one of the list variable):

Unable to display children:Error resolving variables Traceback (most
recent call last): File «/Applications/PyCharm
CE.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_comm.py», line
1004, in do_it
_typeName, valDict = pydevd_vars.resolve_compound_variable(self.thread_id, self.frame_id,
self.scope, self.attributes) TypeError: ‘NoneType’ object is not
iterable

I’ll appreciate any idea as for what may cause this behavior?

Thanks!

asked Jul 27, 2017 at 6:28

Barak Adorian's user avatar

2

It turned out the problem is due to usage of rpyc.py: The process I was debugging was called through rpyc and while I was debugging it, the calling process received a timeout on the rpyc connection.
I think that this caused variables, passed through rpc to lose integrity so the debugger couldn’t present them correctly.

The solution was to downgrade rpyc.py to version 3.3.0 (I was on 3.4.2).
My colleague, Nurit Izraelov, correctly suggested the rpyc.py version may be the blame.

Thanks all!

answered Jul 31, 2017 at 13:59

Barak Adorian's user avatar

4

It happened to me sometimes and what caused the behaviour was that some MyClass triggered an exception on its str method.

In such a case, PyCharm debugger only showed

some_object = {MyClass} Unable to get repr for <class 'my_app.models.MyClass'>

So what I did to confirm the origin was to watch repr(some_object) in the Watches section of the debugger. And there it gave me an explicit error message:

{TypeError}%d format: a number is required, not NoneType

Which helped me trace back to the origin.

I appreciate this is not a generic answer, but just a complement to Fabio’s.

answered Mar 2, 2020 at 15:34

LaurentP13's user avatar

Probably some custom class of yours has a bad __repr__ or __str__ in it and the debugger is unable to print it.

You can probably use a shell at that point to know which elements are actually inside such a dict or list (and see which object has the faulty __repr__ or __str__).

answered Jul 30, 2017 at 13:18

Fabio Zadrozny's user avatar

Fabio ZadroznyFabio Zadrozny

24.6k4 gold badges64 silver badges76 bronze badges

Extending the scope of the problem rather than adding an answer — all the other suggestions are what I do normally to get this working.

Could it be a race condition?

For me it appears to be something weird. In the Variables pane I can see correct representation for theObject, repr(theObject) and even [theObject] but if I set a variable in my code thus a = theObject or b = [theObject] then I get the «Unable to get repr for <class ‘list’>» message.

theObject in this case is an instance of a subclassed D lang struct wrapped with autowrap.

answered Dec 2, 2020 at 18:02

DangerMouse's user avatar

DangerMouseDangerMouse

6957 silver badges20 bronze badges

1. Question 1: The value of the read bboxes is empty

Original code:

  def __init__(self,
               load_instance_masks=False,
               instance_mask_type=input_reader_pb2.NUMERICAL_MASKS,
               label_map_proto_file=None,
               use_display_name=False,
               dct_method=''):
    """Constructor sets keys_to_features and items_to_handlers.

    Args:
      load_instance_masks: whether or not to load and handle instance masks.
      instance_mask_type: type of instance masks. Options are provided in
        input_reader.proto. This is only used if `load_instance_masks` is True.
      label_map_proto_file: a file path to a
        object_detection.protos.StringIntLabelMap proto. If provided, then the
        mapped IDs of 'image/object/class/text' will take precedence over the
        existing 'image/object/class/label' ID.  Also, if provided, it is
        assumed that 'image/object/class/text' will be in the data.
      use_display_name: whether or not to use the `display_name` for label
        mapping (instead of `name`).  Only used if label_map_proto_file is
        provided.
      dct_method: An optional string. Defaults to None. It only takes
        effect when image format is jpeg, used to specify a hint about the
        algorithm used for jpeg decompression. Currently valid values
        are ['INTEGER_FAST', 'INTEGER_ACCURATE']. The hint may be ignored, for
        example, the jpeg library does not have that specific option.

    Raises:
      ValueError: If `instance_mask_type` option is not one of
        input_reader_pb2.DEFAULT, input_reader_pb2.NUMERICAL, or
        input_reader_pb2.PNG_MASKS.
    """
    self.keys_to_features = {
        'image/encoded':  tf.FixedLenFeature((), tf.string, default_value=''),
        'image/format':   tf.FixedLenFeature((), tf.string, default_value='png'),
        # 'image/filename': tf.FixedLenFeature((), tf.string, default_value=''),
        # 'image/key/sha256': tf.FixedLenFeature((), tf.string, default_value=''),
        # 'image/source_id':  tf.FixedLenFeature((), tf.string, default_value=''),
        'image/height':     tf.FixedLenFeature((), tf.int64, 1),
        'image/width':      tf.FixedLenFeature((), tf.int64, 1),
        # # Object boxes and classes.
        'image/object/bbox/xmin':  tf.VarLenFeature(tf.float32),
        'image/object/bbox/xmax':  tf.VarLenFeature(tf.float32),
        'image/object/bbox/ymin':  tf.VarLenFeature(tf.float32),
        'image/object/bbox/ymax':  tf.VarLenFeature(tf.float32),
        'image/object/class/label':  tf.VarLenFeature(tf.int64),
        'image/object/class/object_name':    tf.VarLenFeature(tf.string),
        'image/object/grasp_point/negative_points': tf.VarLenFeature(tf.float32),
        'image/object/grasp_point/negative_tan': tf.VarLenFeature(tf.float32),
        'image/object/grasp_point/positive_points': tf.VarLenFeature(tf.float32),
        'image/object/grasp_point/positive_tan': tf.VarLenFeature(tf.float32),
        # 'image/object/area':          tf.VarLenFeature(tf.float32),
        'image/object/is_crowd':      tf.VarLenFeature(tf.int64),
        # 'image/object/difficult':     tf.VarLenFeature(tf.int64),
        # 'image/object/group_of':      tf.VarLenFeature(tf.int64),
        'image/object/weight':        tf.VarLenFeature(tf.float32),
        'image/object/grasp_point/neg_griper_lengths_grasp_orientation': tf.VarLenFeature(tf.float32),
        'image/object/grasp_point/neg_griper_widths': tf.VarLenFeature(tf.float32),
        'image/object/grasp_point/post_griper_lengths_grasp_orientation': tf.VarLenFeature(tf.float32),
        'image/object/grasp_point/pos_griper_widths': tf.VarLenFeature(tf.float32),


    }
    if dct_method:
      image = slim_example_decoder.Image(
          image_key='image/encoded',
          format_key='image/format',
          channels=3,
          dct_method=dct_method)
    else:
      image = slim_example_decoder.Image(image_key='image/encoded', format_key='image/format', channels=3)
    self.items_to_handlers = {
        fields.InputDataFields.image: image,
        fields.InputDataFields.source_id: ( slim_example_decoder.Tensor('image/object/class/label')),
        # fields.InputDataFields.key: ( slim_example_decoder.Tensor('image/key/sha256')),
        # fields.InputDataFields.filename: ( slim_example_decoder.Tensor('image/object/class/object_name')),
        # Object boxes and classes.
        fields.InputDataFields.groundtruth_boxes: ( slim_example_decoder.BoundingBox(['ymin', 'xmin', 'ymax', 'xmax'],'image/object/bbox/')),
        fields.InputDataFields.negative_points:  ( slim_example_decoder.Tensor('image/object/grasp_point/negative_points')),
        fields.InputDataFields.negative_tan: ( slim_example_decoder.Tensor('image/object/grasp_point/negative_tan')),
        fields.InputDataFields.positive_points: ( slim_example_decoder.Tensor('image/object/grasp_point/positive_points')),
        fields.InputDataFields.positive_tan: ( slim_example_decoder.Tensor('image/object/grasp_point/positive_tan')),
        # fields.InputDataFields.groundtruth_area:  slim_example_decoder.Tensor('image/object/area'),
        fields.InputDataFields.groundtruth_is_crowd: ( slim_example_decoder.Tensor('image/object/is_crowd')),
        # fields.InputDataFields.groundtruth_difficult: ( slim_example_decoder.Tensor('image/object/difficult')),
        # fields.InputDataFields.groundtruth_group_of: ( slim_example_decoder.Tensor('image/object/group_of')),
        fields.InputDataFields.groundtruth_weights: ( slim_example_decoder.Tensor('image/object/weight')),
        fields.InputDataFields.neg_griper_lengths_grasp_orientation: (slim_example_decoder.Tensor('image/object/grasp_point/neg_griper_lengths_grasp_orientation')),
        fields.InputDataFields.neg_griper_widths: (slim_example_decoder.Tensor('image/object/grasp_point/neg_griper_widths')),
        fields.InputDataFields.post_griper_lengths_grasp_orientation: (slim_example_decoder.Tensor('image/object/grasp_point/post_griper_lengths_grasp_orientation')),
        fields.InputDataFields.pos_griper_widths: (slim_example_decoder.Tensor('image/object/grasp_point/pos_griper_widths'))

    }

    label_handler = slim_example_decoder.Tensor('image/object/class/label')
    self.items_to_handlers[fields.InputDataFields.groundtruth_classes] = label_handler   #here restore the groundtruth_classes

  def decode(self, tf_example_string_tensor):
    """Decodes serialized tensorflow example and returns a tensor dictionary.

    Args:
      tf_example_string_tensor: a string tensor holding a serialized tensorflow
        example proto.

    Returns:
      A dictionary of the following tensors.
      fields.InputDataFields.image - 3D uint8 tensor of shape [None, None, 3]
        containing image.
      fields.InputDataFields.source_id - string tensor containing original
        image id.
      fields.InputDataFields.key - string tensor with unique sha256 hash key.
      fields.InputDataFields.filename - string tensor with original dataset
        filename.
      fields.InputDataFields.groundtruth_boxes - 2D float32 tensor of shape
        [None, 4] containing box corners.
      fields.InputDataFields.groundtruth_classes - 1D int64 tensor of shape
        [None] containing classes for the boxes.
      fields.InputDataFields.groundtruth_weights - 1D float32 tensor of
        shape [None] indicating the weights of groundtruth boxes.
      fields.InputDataFields.num_groundtruth_boxes - int32 scalar indicating
        the number of groundtruth_boxes.
      fields.InputDataFields.groundtruth_area - 1D float32 tensor of shape
        [None] containing containing object mask area in pixel squared.
      fields.InputDataFields.groundtruth_is_crowd - 1D bool tensor of shape
        [None] indicating if the boxes enclose a crowd.

    Optional:
      fields.InputDataFields.groundtruth_difficult - 1D bool tensor of shape
        [None] indicating if the boxes represent `difficult` instances.
      fields.InputDataFields.groundtruth_group_of - 1D bool tensor of shape
        [None] indicating if the boxes represent `group_of` instances.
      fields.InputDataFields.groundtruth_instance_masks - 3D float32 tensor of
        shape [None, None, None] containing instance masks.
    """
    serialized_example = tf.reshape(tf_example_string_tensor, shape=[])
    decoder = slim_example_decoder.TFExampleDecoder(self.keys_to_features,
                                                    self.items_to_handlers)
    keys = decoder.list_items()
    tensors = decoder.decode(serialized_example, items=keys)
    tensor_dict = dict(zip(keys, tensors))
    is_crowd = fields.InputDataFields.groundtruth_is_crowd
    tensor_dict[is_crowd] = tf.cast(tensor_dict[is_crowd], dtype=tf.bool)
    tensor_dict[fields.InputDataFields.image].set_shape([None, None, 3])
    tensor_dict[fields.InputDataFields.num_groundtruth_boxes] = tf.shape(tensor_dict[fields.InputDataFields.groundtruth_boxes])[0]

    def default_groundtruth_weights():
      return tf.ones([tf.shape(tensor_dict[fields.InputDataFields.groundtruth_boxes])[0]], dtype=tf.float32)

    tensor_dict[fields.InputDataFields.groundtruth_weights] = tf.cond(
        tf.greater(
            tf.shape(
                tensor_dict[fields.InputDataFields.groundtruth_weights])[0],
            0), lambda: tensor_dict[fields.InputDataFields.groundtruth_weights],
        default_groundtruth_weights)
    return tensor_dict

output value:

2018-04-17 01:25:52.602424: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce GTX 1060 6GB, pci bus id: 0000:01:00.0, compute capability: 6.1)
[[ 121. -350.  266. -249.]]
['positive_tan', 'groundtruth_is_crowd_runtime_shapes', 'negative_tan', 'image', 'neg_griper_widths', 'neg_griper_widths_runtime_shapes', 'filename_runtime_shapes', 'neg_griper_lengths_grasp_orientation', 'num_groundtruth_boxes', 'groundtruth_weights', 'xmin', 'ymin', 'ymax', 'post_griper_lengths_grasp_orientation', 'groundtruth_classes', 'filename', 'positive_points_runtime_shapes', 'negative_points', 'image_name_runtime_shapes', 'groundtruth_boxes_runtime_shapes', 'num_groundtruth_boxes_runtime_shapes', 'xmax', 'positive_points', 'image_name', 'negative_points_runtime_shapes', 'pos_griper_widths_runtime_shapes', 'groundtruth_boxes', 'post_griper_lengths_grasp_orientation_runtime_shapes', 'groundtruth_is_crowd', 'xmax_runtime_shapes', 'ymax_runtime_shapes', 'image_runtime_shapes', 'neg_griper_lengths_grasp_orientation_runtime_shapes', 'xmin_runtime_shapes', 'positive_tan_runtime_shapes', 'groundtruth_weights_runtime_shapes', 'negative_tan_runtime_shapes', 'source_id', 'pos_griper_widths', 'ymin_runtime_shapes', 'source_id_runtime_shapes', 'groundtruth_classes_runtime_shapes']
('positive_tan', array([-0.11666667, -0.27868852, -0.7807647 , -0.08291111,  8.204     ,
        1.07552   , -0.2944    , -0.09111628], dtype=float32))
('groundtruth_is_crowd_runtime_shapes', array([0], dtype=int32))
('negative_tan', array([5.3333335, 2.4666667], dtype=float32))
('image', array([[[[113.,  79.,  87.],
         [113.,  81.,  87.],
         [113.,  83.,  84.],
         ...,
         [ 93.,  73.,  74.],
         [ 89.,  72.,  52.],
         [ 89.,  73.,  63.]],

        [[111.,  78.,  87.],
         [111.,  80.,  87.],
         [111.,  83.,  84.],
         ...,
         [ 96.,  72.,  42.],
         [ 92.,  71.,  52.],
         [ 92.,  72.,  63.]],

        [[110.,  79.,  88.],
         [110.,  81.,  88.],
         [110.,  82.,  86.],
         ...,
         [100.,  71.,  53.],
         [ 96.,  72.,  58.],
         [ 96.,  73.,  62.]],

        ...,

        [[228., 210., 242.],
         [229., 209., 242.],
         [230., 219., 238.],
         ...,
         [232., 218., 217.],
         [231., 217., 217.],
         [231., 219., 217.]],

        [[229., 209., 238.],
         [230., 212., 238.],
         [231., 214., 236.],
         ...,
         [232., 220., 219.],
         [231., 218., 220.],
         [231., 218., 228.]],

        [[229., 207., 234.],
         [230., 212., 234.],
         [231., 217., 234.],
         ...,
         [232., 218., 221.],
         [231., 218., 224.],
         [231., 218., 228.]]]], dtype=float32))
('neg_griper_widths', array([37.628563, 38.899605], dtype=float32))
('neg_griper_widths_runtime_shapes', array([2], dtype=int32))
('filename_runtime_shapes', array([], dtype=int32))
('neg_griper_lengths_grasp_orientation', array([32.55764, 39.92493], dtype=float32))
('num_groundtruth_boxes', 1)
('groundtruth_weights', array([1.], dtype=float32))
('xmin', array([243.], dtype=float32))
('ymin', array([299.], dtype=float32))
('ymax', array([353.], dtype=float32))
('post_griper_lengths_grasp_orientation', array([60.40695 , 63.324562, 43.13571 , 45.154404, 41.323593, 36.714638,
       46.909584, 43.178127], dtype=float32))
('groundtruth_classes', array([], dtype=int64))
('filename', 'bottle')
('positive_points_runtime_shapes', array([16], dtype=int32))
('negative_points', array([281.5   , 320.4245, 287.5   , 345.8685], dtype=float32))
('image_name_runtime_shapes', array([], dtype=int32))
('groundtruth_boxes_runtime_shapes', array([0, 4], dtype=int32))
('num_groundtruth_boxes_runtime_shapes', array([], dtype=int32))
('xmax', array([294.], dtype=float32))
('positive_points', array([277.5   , 325.0085, 278.5   , 325.752 , 276.5   , 298.773 ,
       279.    , 296.8655, 276.    , 297.51  , 279.5   , 296.056 ,
       278.    , 323.124 , 280.5   , 337.959 ], dtype=float32))
('image_name', 'pcd0931r.png')
('negative_points_runtime_shapes', array([4], dtype=int32))
('pos_griper_widths_runtime_shapes', array([8], dtype=int32))
('groundtruth_boxes', array([], shape=(0, 4), dtype=float32))
('post_griper_lengths_grasp_orientation_runtime_shapes', array([8], dtype=int32))
('groundtruth_is_crowd', array([], dtype=bool))
('xmax_runtime_shapes', array([1], dtype=int32))
('ymax_runtime_shapes', array([1], dtype=int32))
('image_runtime_shapes', array([  1, 480, 640,   3], dtype=int32))
('neg_griper_lengths_grasp_orientation_runtime_shapes', array([2], dtype=int32))
('xmin_runtime_shapes', array([1], dtype=int32))
('positive_tan_runtime_shapes', array([8], dtype=int32))
('groundtruth_weights_runtime_shapes', array([1], dtype=int32))
('negative_tan_runtime_shapes', array([2], dtype=int32))
('source_id', array([3]))
('pos_griper_widths', array([27.149261 , 30.561646 , 11.401754 , 12.0415945, 17.117243 ,
       19.104973 , 17.720045 , 22.090721 ], dtype=float32))
('ymin_runtime_shapes', array([1], dtype=int32))
('source_id_runtime_shapes', array([1], dtype=int32))
('groundtruth_classes_runtime_shapes', array([0], dtype=int32))

The data below’groundtruth_boxes’ is:

Unable to display children:Error resolving variables Traceback (most recent call last): File «/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_comm.py», line 1004, in do_it _typeName, valDict = pydevd_vars.resolve_compound_variable(self.thread_id, self.frame_id, self.scope, self.attributes) TypeError: ‘NoneType’ object is not iterable

4.

  • Unsolved Questions
  • This Question

Juan Garcia 17Juan Garcia 17

Method not found: ‘SforceService.Soap.__dir__’

Hi All!,

I’m currently trying to connect with salesforce using a Partner WSDL to entablish and perform actions through SOAP requests, the connection is done correctly, but I’ve noticed that it somehow is not properly working because at the moment to execute a command on Salesforce it breaks down being unable to perform the desired action.

the debugger tool tells me the following messages:

- Unable to get repr for suds.client.PortSelector
- Unable to display children:Error resolving variables Traceback (most recent call last):
- File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 1053, in do_it
- _typeName, val_dict = pydevd_vars.resolve_compound_variable_fields(self.thread_id, self.frame_id, self.scope, self.attributes)
- TypeError: 'NoneType' object is not iterable
- Unable to get repr for suds.client.ServiceSelector (display's the same errors as above).

And the console returns me:

scope: FRAME
attrs: port
Traceback (most recent call last):
  File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_vars.py", line 278, in resolve_compound_variable_fields
    return _typeName, resolver.get_dictionary(VariableWithOffset(var, offset) if offset else var)
  File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_resolver.py", line 86, in get_dictionary
    return self._getPyDictionary(var, names)
  File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_resolver.py", line 159, in _getPyDictionary
    names = self.get_names(var)
  File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_resolver.py", line 147, in get_names
    names = dir(var)
  File "/Users/jgarcia2/Documents/entapps_matterhorn/matterhorn_project/venv/lib/python2.7/site-packages/suds/client.py", line 403, in __getattr__
    return getattr(m, name)
  File "/Users/jgarcia2/Documents/entapps_matterhorn/matterhorn_project/venv/lib/python2.7/site-packages/suds/client.py", line 494, in __getattr__
    return self[name]
  File "/Users/jgarcia2/Documents/entapps_matterhorn/matterhorn_project/venv/lib/python2.7/site-packages/suds/client.py", line 507, in __getitem__
    raise MethodNotFound, qn
MethodNotFound: Method not found: 'SforceService.Soap.__dir__'

Could it be due access restrictions on the wsdl file? or might I be missing something?

You need to sign in to do that.

Dismiss

Я недавно установил Faust и запустил базовую программу для отправки и получения сообщений через Kafka. Я использовал образец кода, упомянутый в (Пример публикации в теме kafka) При запуске программа сначала подключается к Kafka (который также запущен на моей машине). Но затем при попытке использовать Kafka отключается, и приложение вылетает из-за исключения ниже

[2020-11-11 07:08:26,623] [76392] [ERROR] [^---Fetcher]: Crashed reason=ConsumerStoppedError() 
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/mode/services.py", line 779, in _execute_task
    await task
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/faust/transport/consumer.py", line 176, in _fetcher
    await self._drainer
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/faust/transport/consumer.py", line 1039, in _drain_messages
    async for tp, message in ait:
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/faust/transport/consumer.py", line 640, in getmany
    records, active_partitions = await self._wait_next_records(timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/faust/transport/consumer.py", line 676, in _wait_next_records
    records = await self._getmany(
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/faust/transport/consumer.py", line 1269, in _getmany
    return await self._thread.getmany(active_partitions, timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/faust/transport/drivers/aiokafka.py", line 805, in getmany
    return await self.call_thread(
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/mode/threads.py", line 436, in call_thread
    result = await promise
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/mode/threads.py", line 383, in _process_enqueued
    result = await maybe_async(method(*args, **kwargs))
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/mode/utils/futures.py", line 134, in maybe_async
    return await res
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/faust/transport/drivers/aiokafka.py", line 822, in _fetch_records
    raise ConsumerStoppedError()

При отладке причины отключения потребителя я вижу, что в fetcher.py потребителя alokafka соединение закрывается из-за исключения ниже

    Unable to display children:Error resolving variables Traceback (most recent call last):
  File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_resolver.py", line 205, in resolve
    def resolve(self, dict, key):
KeyError: 'Exception'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 1227, in do_it
    def do_it(self, dbg):
  File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_vars.py", line 262, in resolve_compound_variable_fields
    def resolve_compound_variable_fields(thread_id, frame_id, scope, attrs):
  File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_vars.py", line 169, in getVariable
    def getVariable(thread_id, frame_id, scope, attrs):
  File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_resolver.py", line 205, in resolve
    def resolve(self, dict, key):
AttributeError: 'dict' object has no attribute 'Exception'

Версии программного обеспечения приведены ниже.

  • Mac OS: 10.15.4
  • Кафка: 2_12.2.1.1
  • Айокафка: 1.1.6
  • Python: 3.9.0
  • Фауст: 1.10.4

Пожалуйста, помогите здесь.

Понравилась статья? Поделить с друзьями:
  • Unable to display activation page error returned was
  • Unable to determine the hardware id for this computer odis как исправить
  • Unable to determine java runtime environment error code 2 odis
  • Unable to create the error report soulstorm
  • Unable to create project unity как исправить