# Import CSV / Won't Read State

**URL:** <https://forum.mautic.org/t/import-csv-wont-read-state/6817>\
**Category:** Product Support\
**Created:** [December 11, 2016, 12:29pm UTC](https://forum.mautic.org/t/import-csv-wont-read-state/6817 "2016-12-11T12:29:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bellsouthwest](https://avatars.discourse-cdn.com/v4/letter/b/da6949/32.png) [@bellsouthwest](https://forum.mautic.org/u/bellsouthwest)\
**Post date:** [December 11, 2016, 12:29pm UTC](https://forum.mautic.org/t/import-csv-wont-read-state/6817/1 "2016-12-11T12:29:53Z")

</div>

Installation: Bitnami  
  
Mautic 2.3.0-0  
  
AWS-System Linux ip-172-31-49-127 3.13.0-103-generic #150-Ubuntu SMP Thu Nov 24 10:34:17 UTC 2016 x86\_64  
  
Build Date Nov 14 2016 12:51:51  
  
PHP Version 5.6.28  
  
Folder/File Path Is writable  
  
/opt/bitnami/apps/mautic/htdocs/app/config/local.php Writable  
  
/opt/bitnami/apps/mautic/htdocs/app/cache Writable  
  
/opt/bitnami/apps/mautic/htdocs/app/logs Writable  
  
/opt/bitnami/apps/mautic/assets Writable  
  
/opt/bitnami/apps/mautic/htdocs/media/images Writable  
  
/opt/bitnami/apps/mautic/htdocs/translations Writable  
  
  
  
Error log  
  
[2016-12-11 09:40:20] mautic.ERROR: Deprecation: SymfonyComponentDependencyInjectionDefinition::setFactoryService(doctrine) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead. - in file /opt/bitnami/apps/mautic/htdocs/vendor/symfony/dependency-injection/Definition.php - at line 204 [] []

* * *
Issue:  
  
Upon loading imported CSV File my state column  
(#2) State: This value is not valid.  
All the lines read this.  
  
Success!  
0 created, 0 merged, 15 ignored  
  
xr,,,@,,,,aol.com Xiomara O Ramirez Xiomara Ramirez Re/Max Territory-Colleen Newma 2833 S 4th Ave Ste E Yuma AZ 85364-8623 Yuma 928-344-4848  
  
Sample line did not import  

* * *
Upon removal of state all leads imported.  
  
Why?  
  
Default setting in install is: State - state - Core - Segment - Region

---

<div class="post-metadata">

**Author:** ![bellsouthwest](https://avatars.discourse-cdn.com/v4/letter/b/da6949/32.png) [@bellsouthwest](https://forum.mautic.org/u/bellsouthwest)\
**Post date:** [December 11, 2016, 12:29pm UTC](https://forum.mautic.org/t/import-csv-wont-read-state/6817/2 "2016-12-11T12:29:53Z")

</div>

Installation: Bitnami  
Mautic 2.3.0-0  
AWS-System Linux ip-172-31-49-127 3.13.0-103-generic #150-Ubuntu SMP Thu Nov 24 10:34:17 UTC 2016 x86\_64  
Build Date Nov 14 2016 12:51:51  
PHP Version 5.6.28  
Folder/File Path Is writable  
/opt/bitnami/apps/mautic/htdocs/app/config/local.php Writable  
/opt/bitnami/apps/mautic/htdocs/app/cache Writable  
/opt/bitnami/apps/mautic/htdocs/app/logs Writable  
/opt/bitnami/apps/mautic/assets Writable  
/opt/bitnami/apps/mautic/htdocs/media/images Writable  
/opt/bitnami/apps/mautic/htdocs/translations Writable

## Error log [2016-12-11 09:40:20] mautic.ERROR: Deprecation: SymfonyComponentDependencyInjectionDefinition::setFactoryService(doctrine) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead. - in file /opt/bitnami/apps/mautic/htdocs/vendor/symfony/dependency-injection/Definition.php - at line 204 [] []

Issue:

Upon loading imported CSV File my state column  
(#2) State: This value is not valid.  
All the lines read this.

Success!  
0 created, 0 merged, 15 ignored

xr,@,[aol.com](http://aol.com) Xiomara O Ramirez Xiomara Ramirez Re/Max Territory-Colleen Newma 2833 S 4th Ave Ste E Yuma AZ 85364-8623 Yuma 928-344-4848

Sample line did not import

* * *

Upon removal of state all leads imported.

Why?

Default setting in install is: State - state - Core - Segment - Region

---

<div class="post-metadata">

**Author:** ![bellsouthwest](https://avatars.discourse-cdn.com/v4/letter/b/da6949/32.png) [@bellsouthwest](https://forum.mautic.org/u/bellsouthwest)\
**Post date:** [December 11, 2016, 6:41pm UTC](https://forum.mautic.org/t/import-csv-wont-read-state/6817/3 "2016-12-11T18:41:30Z")

</div>

ProblemSolved-Can not use abbreviationSTATE-like AZ  
The Fields are to be spelled out=Arizona

---

<div class="post-metadata">

**Author:** ![alainarae](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@alainarae](https://forum.mautic.org/u/alainarae)\
**Post date:** [August 3, 2017, 11:48pm UTC](https://forum.mautic.org/t/import-csv-wont-read-state/6817/4 "2017-08-03T23:48:27Z")

</div>

I too was struggling with 2 letter state abbreviations in both importing and with filter to add to segments. Hope this helps - the trick is to add the abbreviations as options. Go to the setting in the upper right. Click custom fields. I added one with label “state” (or you could do stateabrev if that helps you, the default is State with a capital S) and in the default value paste this:

AL , AK, AZ, AR, CA, CO, CT, DE, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND ,OH ,OK ,OR ,PA, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI , WY

You can also add in the actual state names as well if you are using both abbreviations and full state names, but I only use the 2 letter so this is all I put.

Next: when you FILTER your contacts into segments, go to segments, +New, and after naming it, select the filters tab. Here you can scroll down to select your filters by selecting from Contact info or from Company info. At the very bottom of the Contact options you will find your custom “state” field and then you can not only have your cake, you can sort by it too…

Enjoy!
