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
#1
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.

CODE:::

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 :::
Error:
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:
Error:
File "C:\Users\ANANT\PycharmProjects\test_final\test_copy.py", 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.
Reply


Messages In This Thread
TypeError: size; expecting a recognized type filling string dict - by a11_m11 - Feb-10-2020, 08:26 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  is import cointegration_analysis a recognized module mitcht33 1 384 Nov-06-2023, 09:29 PM
Last Post: deanhystad
  pandas : problem with conditional filling of a column Xigris 2 592 Jul-22-2023, 11:44 AM
Last Post: Xigris
  The term 'pip' is not recognized as the name of a cmdlet, function michaelnicol 1 597 Jul-16-2023, 11:12 PM
Last Post: deanhystad
  boto3 - Error - TypeError: string indices must be integers kpatil 7 1,182 Jun-09-2023, 06:56 PM
Last Post: kpatil
  "TypeError: string indices must be integers, not 'str'" while not using any indices bul1t 2 1,931 Feb-11-2023, 07:03 PM
Last Post: deanhystad
  Index Function not recognized in Python 3 Peter_B_23 1 1,117 Jan-08-2023, 04:52 AM
Last Post: deanhystad
  reading a table which is of type string saisankalpj 2 926 Dec-03-2022, 11:19 AM
Last Post: saisankalpj
  TypeError: string indices must be integers JonWayn 12 3,259 Aug-31-2022, 03:29 PM
Last Post: deanhystad
  TypeError: unsupported operand type(s) for +: 'dict' and 'int' nick12341234 1 9,207 Jul-15-2022, 04:04 AM
Last Post: ndc85430
  TypeError: float() argument must be a string or a number, not 'list' Anldra12 2 4,763 Jul-01-2022, 01:23 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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