# AWX 12.0 Inventory script started failing on value too long for type character varying(512). How to debug?

**URL:** <https://forum.ansible.com/t/awx-12-0-inventory-script-started-failing-on-value-too-long-for-type-character-varying-512-how-to-debug/34056>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [October 19, 2020, 2:44pm UTC](https://forum.ansible.com/t/awx-12-0-inventory-script-started-failing-on-value-too-long-for-type-character-varying-512-how-to-debug/34056 "2020-10-19T14:44:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eaoinco](https://avatars.discourse-cdn.com/v4/letter/e/53a042/32.png) [@eaoinco](https://forum.ansible.com/u/eaoinco)\
**Post date:** [October 19, 2020, 2:44pm UTC](https://forum.ansible.com/t/awx-12-0-inventory-script-started-failing-on-value-too-long-for-type-character-varying-512-how-to-debug/34056/1 "2020-10-19T14:44:13Z")

</div>

Hi Everyone!

The inventory script (from Oracle Cloud) started failing. I could not find any super long group names in the output json…  
How can I debug this?

102.993 DEBUG Group “VM.Standard2.4” added  
103.000 DEBUG Group “VM.Standard2.8” added  
Traceback (most recent call last):  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/models/query.py”, line 554, in update\_or\_create  
obj = self.select\_for\_update().get(\*\*kwargs)  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/models/query.py”, line 408, in get  
self.model.\_meta.object\_name  
awx.main.models.inventory.DoesNotExist: Group matching query does not exist.  
During handling of the above exception, another exception occurred:  
Traceback (most recent call last):  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/backends/utils.py”, line 84, in \_execute  
return self.cursor.execute(sql, params)  
psycopg2.errors.StringDataRightTruncation: value too long for type character varying(512)  
The above exception was the direct cause of the following exception:  
Traceback (most recent call last):  
File “/var/lib/awx/venv/awx/bin/awx-manage”, line 8, in   
sys.exit(manage())  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/ **init**.py”, line 154, in manage  
execute\_from\_command\_line(sys.argv)  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/core/management/ **init**.py”, line 381, in execute\_from\_command\_line  
utility.execute()  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/core/management/ **init**.py”, line 375, in execute  
self.fetch\_command(subcommand).run\_from\_argv(self.argv)  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/core/management/base.py”, line 323, in run\_from\_argv  
self.execute(\*args, \*\*cmd\_options)  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/core/management/base.py”, line 364, in execute  
output = self.handle(\*args, \*\*options)  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/main/management/commands/inventory\_import.py”, line 1141, in handle  
raise exc  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/main/management/commands/inventory\_import.py”, line 1073, in handle  
self.load\_into\_database()  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/main/management/commands/inventory\_import.py”, line 887, in load\_into\_database  
self.\_create\_update\_groups()  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/main/management/commands/inventory\_import.py”, line 657, in \_create\_update\_groups  
‘description’:group\_desc  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/models/fields/related\_descriptors.py”, line 680, in update\_or\_create  
return super(RelatedManager, self.db\_manager(db)).update\_or\_create(\*\*kwargs)  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/models/manager.py”, line 82, in manager\_method  
return getattr(self.get\_queryset(), name)(\*args, \*\*kwargs)  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/models/query.py”, line 559, in update\_or\_create  
obj, created = self.\_create\_object\_from\_params(kwargs, params, lock=True)  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/models/query.py”, line 575, in \_create\_object\_from\_params  
obj = self.create(\*\*params)  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/models/query.py”, line 422, in create  
obj.save(force\_insert=True, using=self.db)  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/main/models/base.py”, line 319, in save  
super(PrimordialModel, self).save(\*args, \*\*kwargs)  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/main/models/base.py”, line 164, in save  
super(CreatedModifiedModel, self).save(\*args, \*\*kwargs)  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/models/base.py”, line 741, in save  
force\_update=force\_update, update\_fields=update\_fields)  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/models/base.py”, line 779, in save\_base  
force\_update, using, update\_fields,  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/models/base.py”, line 870, in \_save\_table  
result = self.\_do\_insert(cls.\_base\_manager, using, fields, update\_pk, raw)  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/models/base.py”, line 908, in \_do\_insert  
using=using, raw=raw)  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/models/manager.py”, line 82, in manager\_method  
return getattr(self.get\_queryset(), name)(\*args, \*\*kwargs)  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/models/query.py”, line 1186, in \_insert  
return query.get\_compiler(using=using).execute\_sql(return\_id)  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/models/sql/compiler.py”, line 1375, in execute\_sql  
cursor.execute(sql, params)  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/backends/utils.py”, line 67, in execute  
return self.\_execute\_with\_wrappers(sql, params, many=False, executor=self.\_execute)  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/backends/utils.py”, line 76, in \_execute\_with\_wrappers  
return executor(sql, params, many, context)  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/backends/utils.py”, line 84, in \_execute  
return self.cursor.execute(sql, params)  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/utils.py”, line 89, in **exit**  
raise dj\_exc\_value.with\_traceback(traceback) from exc\_value  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/backends/utils.py”, line 84, in \_execute  
return self.cursor.execute(sql, params)  
django.db.utils.DataError: value too long for type character varying(512)
