Python Forum
TypeError: size; expecting a recognized type filling string dict
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TypeError: size; expecting a recognized type filling string dict
I have been working on Python script for Abaqus and it has to do with dynamic changes in the parameters of the model. The script opens up a .txt file and reads different values. The values are separated using tabs and I am using split() function of the Abaqus-Python to read the values properly once I have assigned them to a list.
The last index is [5] and it contains mesh size, again a float value. The structure is properly drawn in ABAQUS, the only error it throws me is while assigning the mesh size. It throws me the error listed above. So I tried using repr() to make it a string, but I was it will throw me that the input should be float/integer value and it did exactly the same. Now I am stuck and I can't work any further. I even tried to truncate the float value to 3-decimal points for the mesh size, but it would still throw the same error.
Any help is much appreciated, thanks a lot :)

What I am expecting is that it writes exactly how the mesh size must be written in the specified line. I don't understand what is the problem, because it is able to write the dimensions properly, the only problem comes while writing the float value of mesh size.


beamPart.setElementType(elemTypes=(ElemType(elemCode=B23, elemLibrary=STANDARD), ), regions=beam_mesh_region)
    beamPart.seedPart(deviationFactor=0.1, minSizeFactor=0.1, size=mesh)
In the above line, it throws me the error as shown in the thread :::
TypeError: size; found 'module', expecting a recognized type filling string dict
From what I know is, it always writes in 'module' - so the error has something to with size or the filling string dict.

The exact error looks like this:
File "C:\Users\ANANT\PycharmProjects\test_final\", line 104, in <module> beamPart.seedPart(deviationFactor=0.1, minSizeFactor=0.1, size=mesh) TypeError: size; found 'module', expecting a recognized type filling string dict
Thanks for the feedback, I shall keep that in mind hereafter.

Possibly Related Threads…
Thread Author Replies Views Last Post
  You have any idea, how fix TypeError: unhashable type: 'list' lsepolis123 2 699 Jun-02-2021, 07:55 AM
Last Post: supuflounder
  TypeError: int() argument must be a string, a bytes-like object or a number, not 'Non Anldra12 2 1,320 May-02-2021, 03:45 PM
Last Post: Anldra12
  TypeError: __str__ returned non-string (type tuple) Anldra12 1 1,532 Apr-13-2021, 07:50 AM
Last Post: Anldra12
  What type of *data* is the name of a list/tuple/dict, etc? alloydog 9 1,119 Jan-30-2021, 07:11 AM
Last Post: alloydog
Question dict value, how to change type from int to list? swissjoker 3 839 Dec-09-2020, 09:50 AM
Last Post: perfringo
  Pyspark SQL Error - mismatched input 'FROM' expecting <EOF> Ariean 3 10,699 Nov-20-2020, 03:49 PM
Last Post: Ariean
  [SOLVED] Filling multidict from CSV file? Winfried 3 572 Oct-24-2020, 08:26 PM
Last Post: Winfried
  TypeError: string indices must be integers hendern 2 1,036 Oct-02-2020, 10:16 PM
Last Post: hendern
  TypeError: 'type' object is not subscriptable Stef 1 1,512 Aug-28-2020, 03:01 PM
Last Post: Gribouillis
  String index out of bounds ( Python : Dict ) kommu 2 867 Jun-25-2020, 08:52 PM
Last Post: menator01

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020