# CLI -Import command does not seem to be working in 1.7.4

**URL:** <https://community.influxdata.com/t/cli-import-command-does-not-seem-to-be-working-in-1-7-4/8722>\
**Category:** Systems\
**Created:** [February 22, 2019, 8:54pm UTC](https://community.influxdata.com/t/cli-import-command-does-not-seem-to-be-working-in-1-7-4/8722 "2019-02-22T20:54:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![scavuzzoj](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@scavuzzoj](https://community.influxdata.com/u/scavuzzoj)\
**Post date:** [February 22, 2019, 8:54pm UTC](https://community.influxdata.com/t/cli-import-command-does-not-seem-to-be-working-in-1-7-4/8722/1 "2019-02-22T20:54:21Z")

</div>

I’m running Influx 1.7.4 on a Windows OS and can’t get the “influx -Import” command to work. I even tried this example shown below in the Influx Docs and many other variations with no luck.

> **[Using influx - InfluxDB command line interface | InfluxDB OSS v1 Documentation](https://docs.influxdata.com/influxdb/v1/tools/shell/)**
>
> InfluxDB’s command line interface (influx) is an interactive shell for the HTTP API.

Is anyone else having this issue? I can figure out what I’m missing or if there’s a bug. Here’s the error…

C:...\Influx\influxdb-1.7.4-1\>influx -import -path=datarrr.txt -precision=s  
2019/02/22 15:47:53 error writing batch: {“error”:"unable to parse ‘treasures,captain\_id=dread\_pira  
te\_roberts value=801 1550865814\r’: bad timestamp\nunable to parse ‘treasures,captain\_id=flint value  
=29 1550865814\r’: bad timestamp\nunable to parse ‘treasures,captain\_id=sparrow value=38 1550865814  
r’: bad timestamp\nunable to parse ‘treasures,captain\_id=tetra value=47 1550865814\r’: bad timestamp  
"}

2019/02/22 15:47:53 treasures,captain\_id=dread\_pirate\_roberts value=801 1550865814  
treasures,captain\_id=flint value=29 1550865814  
treasures,captain\_id=sparrow value=38 1550865814  
treasures,captain\_id=tetra value=47 1550865814

ERROR: 4 points were not inserted

I’m also getting this error…

C:...\Influx\influxdb-1.7.4-1\>influx -import -path=LPData00001.txt  
2019/02/22 15:51:37 error: error parsing query: found ?, expected SELECT, DELETE, SHOW, CREATE, DROP  
, EXPLAIN, GRANT, REVOKE, ALTER, SET, KILL at line 1, char 1  
2019/02/22 15:51:37 error: error parsing query: found JimsMeasurement01649, expected SELECT, DELETE,  
SHOW, CREATE, DROP, EXPLAIN, GRANT, REVOKE, ALTER, SET, KILL at line 1, char 1  
2019/02/22 15:51:37 error: error parsing query: found JimsMeasurement01649, expected SELECT, DELETE,  
SHOW, CREATE, DROP, EXPLAIN, GRANT, REVOKE, ALTER, SET, KILL at line 1, char 1

Where LPData00001.txt = …

# DML

# CONTEXT-DATABASE: JimsDB2

JimsMeasurement01649,EngUnit=PPM Status=“Good”,Value=52.1166419620319 1420088400000000000  
JimsMeasurement01649,EngUnit=PPM Status=“Good”,Value=94.9015425680828 1420088410000000000

---

<div class="post-metadata">

**Author:** ![MarcV](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/marcv/32/7676_2.png) [@MarcV](https://community.influxdata.com/u/MarcV)\
**Post date:** [February 23, 2019, 3:32pm UTC](https://community.influxdata.com/t/cli-import-command-does-not-seem-to-be-working-in-1-7-4/8722/2 "2019-02-23T15:32:28Z")

</div>

Hi Jim ,

the first problem looks like some special characters in your file  
around the timestamp ?

the second problem probably too because I assume you have # in your file  
like this ( without the single quotes to make the # visible in this post ) ?  
'# DML  
'# CONTEXT-DATABASE: JimsDB2

have a nice weekend ,  
Marc

---

<div class="post-metadata">

**Author:** ![scavuzzoj](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@scavuzzoj](https://community.influxdata.com/u/scavuzzoj)\
**Post date:** [February 25, 2019, 8:55pm UTC](https://community.influxdata.com/t/cli-import-command-does-not-seem-to-be-working-in-1-7-4/8722/3 "2019-02-25T20:55:29Z")

</div>

Hi Marc,

Thanks for the reply. I’m still stuck on this issue which seems like a very basic task. I’m uploading a data file and BAT file for your review. Let me know if you see anything wrong.

[Edit.BAT.txt](https://community.influxdata.com/uploads/short-url/zcjz3AwGBUcWblXStjXSH3n5TRN.txt) (45 Bytes)

[datarrr.txt](https://community.influxdata.com/uploads/short-url/qVkcALUxONq2wvpMuerUGj1nfO8.txt) (261 Bytes)

Here’s the error…

C:…\Influx\influxdb-1.7.4-1\>influx -import -path=datarrr.  
2019/02/25 15:53:09 error writing batch: {“error”:“unable to parse ‘Measurement  
88400\r’: bad timestamp\nunable to parse ‘Measurement01649 Value=94 1420088410\r  
able to parse ‘Measurement01649 Value=8 1420088420\r’: bad timestamp\nunable to  
649 Value=50 1420088430\r’: bad timestamp\nunable to parse 'Measurement01649 Val  
bad timestamp”}

2019/02/25 15:53:09 Measurement01649 Value=52 1420088400

Measurement01649 Value=94 1420088410

Measurement01649 Value=8 1420088420

Measurement01649 Value=50 1420088430

Measurement01649 Value=94 1420088440

ERROR: 5 points were not inserted

---

<div class="post-metadata">

**Author:** ![MarcV](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/marcv/32/7676_2.png) [@MarcV](https://community.influxdata.com/u/MarcV)\
**Post date:** [February 26, 2019, 10:58am UTC](https://community.influxdata.com/t/cli-import-command-does-not-seem-to-be-working-in-1-7-4/8722/4 "2019-02-26T10:58:37Z")

</div>

Hi ,  
with your uploaded files it works in Linux without any problem,  
I tried it on windows , and even if I insert the data manually ,  
export it in windows , the exported file cannot be imported it gives the same error.

I have read that “Windows support is considered **“experimental”** for all components except Telegraf,”

here …

[https://www.influxdata.com/blog/running-the-tick-stack-on-windows/](https://www.influxdata.com/blog/running-the-tick-stack-on-windows/)

---

<div class="post-metadata">

**Author:** ![scavuzzoj](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@scavuzzoj](https://community.influxdata.com/u/scavuzzoj)\
**Post date:** [February 26, 2019, 3:39pm UTC](https://community.influxdata.com/t/cli-import-command-does-not-seem-to-be-working-in-1-7-4/8722/5 "2019-02-26T15:39:21Z")

</div>

Marc:

Thanks a lot for testing this. I did a bit more research and found this…

> <https://github.com/influxdata/influxdb/issues/10507>
>
> \_\_System info:\_\_
> InfluxDB shell version 1.7.1 for Windows
> InfluxDB server vers…ion 1.6.0 running on CentOS 7.2.1511
> 
> \_\_Steps to reproduce:\_\_
> 
> 1. Run influx command line interface using import option
> \`influx.exe -host x.y.z -import -path test.txt\`
> 2. Specify path to file with windows line endings (\\r\\n)
> \[test.txt\](https://github.com/influxdata/influxdb/files/2601212/test.txt)
> 
> \_\_Expected behavior:\_\_ 
> File should be imported correctly.
> 
> \_\_Actual behavior:\_\_ 
> File fails to import with following error.
> 
> \> 2018/11/20 10:56:29 error writing batch: {"error":"unable to parse ''82d1ca6a-f580-420f-b808-ecff8ecb18d9' value=0 1439856000\\r': bad timestamp\\n...
> 
> Converting the file to unix style line endings (\\n) fixes the issue, but it's not entirely clear this is the problem from the error message.

I converted the file to Unix style line endings and it now works fine on the Windows instance.
