# Unable to push source string containing "\\\\N"

**URL:** <https://community.transifex.com/t/unable-to-push-source-string-containing-n/3448>\
**Category:** Q&A\
**Tags:** tx-cli-go\
**Created:** [May 24, 2023, 4:12am UTC](https://community.transifex.com/t/unable-to-push-source-string-containing-n/3448 "2023-05-24T04:12:23Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![rffontenelle](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.transifex.com/rffontenelle/32/2444_2.png) [@rffontenelle](https://community.transifex.com/u/rffontenelle)\
**Post date:** [May 24, 2023, 4:12am UTC](https://community.transifex.com/t/unable-to-push-source-string-containing-n/3448/1 "2023-05-24T04:12:23Z")

</div>

A source string “\N” in my .pot file prevents me from push this resource’s source strings to Transifex. If I remove that string from the file, push works. If I keep it, I get the following message (omitted organization, project, resource names):

```auto
[project].[resource] - upload of resource 'o:[organization]:p:[project]:r:[resource]' failed - parse_error: null value in column "string" of relation "resources_translation" violates not-null constraint
DETAIL: Failing row contains (1318096651, null, 44d0dc437936b13f7cea2f77053806bd, 5, 2023-05-24 04:00:46.230375+00, 2023-05-24 04:00:46.230375+00, 459636360, 20, 7302, 1, 3533169, API, f, null, c93b2b42-12db-416e-a8ce-463068f610ab, 232830, null, null, null, 44d0dc437936b13f7cea2f77053806bd, null, null, null).
CONTEXT: COPY resources_translation, line 1: "2023-05-24 04:00:46.230375	\N	c93b2b42-12db-416e-a8ce-463068f610ab	20	2023-05-24 04:00:46.230375	\N	..."

```

That pot’s source string is really simple `msgid "\\N"`, and the message’s last line mentions `\N`. I don’t know what that means, but seems related.

---

<div class="post-metadata">

**Author:** ![Cesar\_Garcia](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.transifex.com/cesar_garcia/32/1745_2.png) [@Cesar\_Garcia](https://community.transifex.com/u/Cesar_Garcia)\
**Post date:** [May 24, 2023, 6:30pm UTC](https://community.transifex.com/t/unable-to-push-source-string-containing-n/3448/2 "2023-05-24T18:30:15Z")

</div>

Hello @rffontenelle ,

Thank you for reaching out to Transifex support.  
Regarding your question, The \N is a line break that needs to be in lowercase so our parser can recognize it, I just did a test, and it worked :

Having \n :

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/transifex/original/2X/a/a4550cb594aecd7f2a76e4c4291bbc4d3b637e1c.jpeg)  
Having \N :  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/transifex/original/2X/5/5268d952da6390c9942305f66e616ab3e3c11684.jpeg)

Give it a try, and let me know how it goes.  
Best Regards

---

<div class="post-metadata">

**Author:** ![rffontenelle](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.transifex.com/rffontenelle/32/2444_2.png) [@rffontenelle](https://community.transifex.com/u/rffontenelle)\
**Post date:** [June 2, 2023, 6:19pm UTC](https://community.transifex.com/t/unable-to-push-source-string-containing-n/3448/3 "2023-06-02T18:19:01Z")

</div>

Hi @Cesar_Garcia

I shouldn’t change the source string as the documentation expects it to be displayed as it is. Is there any flag or any other way I can tell Transifex this should not be parsed as a line-break character?

For now, I suppose I can hack a script to delete that source string from the POT file, causing the string to not be pushed to Transifex, but I would prefer to avoid this type of workaround.

---

<div class="post-metadata">

**Author:** ![Cesar\_Garcia](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.transifex.com/cesar_garcia/32/1745_2.png) [@Cesar\_Garcia](https://community.transifex.com/u/Cesar_Garcia)\
**Post date:** [June 5, 2023, 6:01pm UTC](https://community.transifex.com/t/unable-to-push-source-string-containing-n/3448/4 "2023-06-05T18:01:30Z")

</div>

Hello @rffontenelle

Unfortunately, We have nothing to bypass this error except by changing the source code; our parser reads the file line by line and ensures the syntax is correct according to the file type. (This is standard)

![image](https://canada1.discourse-cdn.com/flex030/uploads/transifex/original/2X/0/0249beacf438516555ff1d5bc18ae2457882b793.jpeg)

Going over the file Im pretty confident this is a typo. Could you confirm with your team ?

Best Regards

---

<div class="post-metadata">

**Author:** ![rffontenelle](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.transifex.com/rffontenelle/32/2444_2.png) [@rffontenelle](https://community.transifex.com/u/rffontenelle)\
**Post date:** [June 5, 2023, 6:21pm UTC](https://community.transifex.com/t/unable-to-push-source-string-containing-n/3448/5 "2023-06-05T18:21:22Z")

</div>

I confirmed it is not a typo. It is a documentation showing regular expressions that can be used by that library.

For the record, I worked around this issue by patching any POT file to remove strings which has `\\N` as source string. Then I push the source strings to Transifex. Ugly, but it works:

```sh
msggrep -Ke '^\\N$' $pot > $tmp
msgcomm --no-wrap --less-than=2 $pot $tmp > $tmp2
mv $tmp2 $pot

```

---

<div class="post-metadata">

**Author:** ![Cesar\_Garcia](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.transifex.com/cesar_garcia/32/1745_2.png) [@Cesar\_Garcia](https://community.transifex.com/u/Cesar_Garcia)\
**Post date:** [June 6, 2023, 7:11pm UTC](https://community.transifex.com/t/unable-to-push-source-string-containing-n/3448/6 "2023-06-06T19:11:13Z")

</div>

Hello @rffontenelle

Thanks for letting us know what you use as a workaround, I apologize for the inconvenience caused.

If there is anything else I could do to help please let me know  
Best Regards

---

<div class="post-metadata">

**Author:** ![m-aciek](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.transifex.com/m-aciek/32/2559_2.png) [@m-aciek](https://community.transifex.com/u/m-aciek)\
**Post date:** [June 7, 2023, 8:18am UTC](https://community.transifex.com/t/unable-to-push-source-string-containing-n/3448/7 "2023-06-07T08:18:12Z")

</div>

Hello @Cesar_Garcia, please note that the workaround used does solve the problem of pushing resources, but doesn’t solve the problem of translating those problematic strings. By removing them from the resources we won’t be able to translate them in the target document.

Passing this case to development team as a bug would be highly appreciated. More details on Python documentation project context can be found here: [Ilegal character breaks pushing source strings to resources · Issue #15 · rffontenelle/docspush-transifex · GitHub](https://github.com/rffontenelle/docspush-transifex/issues/15).

Kind regards

---

<div class="post-metadata">

**Author:** ![Cesar\_Garcia](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.transifex.com/cesar_garcia/32/1745_2.png) [@Cesar\_Garcia](https://community.transifex.com/u/Cesar_Garcia)\
**Post date:** [June 8, 2023, 5:15am UTC](https://community.transifex.com/t/unable-to-push-source-string-containing-n/3448/8 "2023-06-08T05:15:16Z")

</div>

Hello @m-aciek @rffontenelle,

Sure, I will forward this case to my dev team so they can evaluate it and follow up with a bug report.  
I will inform you as soon as I get an update from them.

Best Regards

---

<div class="post-metadata">

**Author:** ![rffontenelle](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.transifex.com/rffontenelle/32/2444_2.png) [@rffontenelle](https://community.transifex.com/u/rffontenelle)\
**Post date:** [June 9, 2023, 12:58pm UTC](https://community.transifex.com/t/unable-to-push-source-string-containing-n/3448/9 "2023-06-09T12:58:02Z")

</div>

We were lucky that this string doesn’t need translation. 😁

---

<div class="post-metadata">

**Author:** ![m-aciek](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.transifex.com/m-aciek/32/2559_2.png) [@m-aciek](https://community.transifex.com/u/m-aciek)\
**Post date:** [June 9, 2023, 1:07pm UTC](https://community.transifex.com/t/unable-to-push-source-string-containing-n/3448/10 "2023-06-09T13:07:58Z")

</div>

Oh, in fact the translations aren’t needed in a number of cases. Still there are two strings in which `\N` is used inline:

- [cpython/codecs.rst at eaff9c39aa1a70d401521847cc35bec883ae9772 · python/cpython · GitHub](https://github.com/python/cpython/blob/eaff9c39aa1a70d401521847cc35bec883ae9772/Doc/library/codecs.rst?plain=1#L379)
- [cpython/codecs.rst at eaff9c39aa1a70d401521847cc35bec883ae9772 · python/cpython · GitHub](https://github.com/python/cpython/blob/eaff9c39aa1a70d401521847cc35bec883ae9772/Doc/library/codecs.rst?plain=1#L503-L506)

---

<div class="post-metadata">

**Author:** ![rffontenelle](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.transifex.com/rffontenelle/32/2444_2.png) [@rffontenelle](https://community.transifex.com/u/rffontenelle)\
**Post date:** [June 12, 2023, 2:26pm UTC](https://community.transifex.com/t/unable-to-push-source-string-containing-n/3448/11 "2023-06-12T14:26:34Z")

</div>

Looks like Transifex only breaks when the msgid is exactly `"\\N"`. Other cases where `\\N` is used in the middle of the text doesn’t seem to be breaking, and string is extracted perfectly – which is a great relief as we are still able to translate everything that needs to be translated.

![Captura de tela de 2023-06-12 11-23-18](https://canada1.discourse-cdn.com/flex030/uploads/transifex/original/2X/8/863ab6a4428a12bb955da9f2fbffe6d660a5699d.png)

---

<div class="post-metadata">

**Author:** ![m-aciek](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.transifex.com/m-aciek/32/2559_2.png) [@m-aciek](https://community.transifex.com/u/m-aciek)\
**Post date:** [June 12, 2023, 2:46pm UTC](https://community.transifex.com/t/unable-to-push-source-string-containing-n/3448/12 "2023-06-12T14:46:18Z")

</div>

Ah, thank you @rffontenelle for explaining. I didn’t do a double check. cc @Cesar_Garcia sorry for the confusion.

---

<div class="post-metadata">

**Author:** ![Cesar\_Garcia](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.transifex.com/cesar_garcia/32/1745_2.png) [@Cesar\_Garcia](https://community.transifex.com/u/Cesar_Garcia)\
**Post date:** [June 12, 2023, 6:25pm UTC](https://community.transifex.com/t/unable-to-push-source-string-containing-n/3448/13 "2023-06-12T18:25:15Z")

</div>

Don’t worry @m-aciek,

I have forwarded the case to my dev team, They will review and implement a solution if needed in future releases.

Thanks for keep us updated @rffontenelle  
Cesar
