# Websource silently fails on syntax error in ParserScriptAlbum part

**URL:** https://community.mp3tag.de/t/websource-silently-fails-on-syntax-error-in-parserscriptalbum-part/11821
**Category:** Web Sources Discussion
**Created:** [April 6, 2011, 10:35am UTC](https://community.mp3tag.de/t/websource-silently-fails-on-syntax-error-in-parserscriptalbum-part/11821 "2011-04-06T10:35:37Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![anon40688970](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/898d66/32.png) [@anon40688970](https://community.mp3tag.de/u/anon40688970)
#### Post date: [April 6, 2011, 10:35am UTC](https://community.mp3tag.de/t/websource-silently-fails-on-syntax-error-in-parserscriptalbum-part/11821/1 "2011-04-06T10:35:37Z")

</div>

Caused from a typo i had some problems today. My script contained the following line in the ParserScriptAlbum part:

```
regexreplace "(?<=<th colspan=.2.>).+(\d+)(?=:\s+

```

\s+)" "(Folge \1)"  
I forget a 'p' in the command regex **p** replace. However, i didnt get an error or any results from my script. It just finished after some time and showed up with all fields blank in the 'Adjust tag information' dialog. Nothing was written to the debug log, although turned on. If I deleted the debug logfile, no logfile has been created. In my case, information about previous commands that have been sucessful executed before the buggy line has been lost. No error was logged in Mp3tagError.log.

I could image two changes:

- it would be nice to inform the user about the typo, somehow
- the debug log should be written anyway

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [April 6, 2011, 11:04am UTC](https://community.mp3tag.de/t/websource-silently-fails-on-syntax-error-in-parserscriptalbum-part/11821/2 "2011-04-06T11:04:36Z")

</div>

> [@anon40688970](#):
>
> Caused from a typo i had some problems today.

For Notepad++ there is a very usefull language extension for the mp3tag web sources script language which highligts the comands of the script for a better overview. That helps to avoid typos, because you see they don't have the correct colour:  
[Web Sources Framework: Help needed](https://community.mp3tag.de/t/10944/8)

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [April 6, 2011, 3:15pm UTC](https://community.mp3tag.de/t/websource-silently-fails-on-syntax-error-in-parserscriptalbum-part/11821/3 "2011-04-06T15:15:36Z")

</div>

> [@pone](#):
>
> For Notepad++ there is a very usefull language extension for the mp3tag web sources script language which highligts the comands of the script for a better overview. That helps to avoid typos, because you see they don't have the correct colour: ...

The latest Mp3tag language definition file for Notepad++ can be downloaded from there ...  
[http://notepad-plus.sourceforge.net/commun...\_Mp3tag\_mte.zip](http://notepad-plus.sourceforge.net/commun/userDefinedLang/NPP_UserLang_Mp3tag_mte.zip)

... and for other Editors ...  
[http://cid-387b58366897ac93.office.live.co...%20Highlighting](http://cid-387b58366897ac93.office.live.com/browse.aspx/Mp3tag%20Syntax%20Highlighting)

DD.20110406.1917.CEST

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [April 6, 2011, 3:48pm UTC](https://community.mp3tag.de/t/websource-silently-fails-on-syntax-error-in-parserscriptalbum-part/11821/4 "2011-04-06T15:48:52Z")

</div>

> [@DetlevD](#):
>
> The latest Mp3tag language definition file for Notepad++ can be downloaded from there ...  
> [http://notepad-plus.sourceforge.net/commun...\_Mp3tag\_mte.zip](http://notepad-plus.sourceforge.net/commun/userDefinedLang/NPP_UserLang_Mp3tag_mte.zip)

It's for the Mp3tag Export Language, not the Mp3tag Web Sources Language.

Someone should stard a thread and collect & describe all these language plugins.

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [April 6, 2011, 4:19pm UTC](https://community.mp3tag.de/t/websource-silently-fails-on-syntax-error-in-parserscriptalbum-part/11821/5 "2011-04-06T16:19:26Z")

</div>

> [@pone](#):
>
> It's for the Mp3tag Export Language, not the Mp3tag Web Sources Language. Someone should stard a thread and collect & describe all these language plugins.

Ahh yes! I was blind for a moment or so. 🕶

DD.20110406.2020.CEST

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [April 6, 2011, 5:42pm UTC](https://community.mp3tag.de/t/websource-silently-fails-on-syntax-error-in-parserscriptalbum-part/11821/6 "2011-04-06T17:42:37Z")

</div>

This kind of error should get logged to the scripterror.log file in %appdata%\Mp3tag\data

---

<div class="post-metadata">

### Author: ![anon40688970](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/898d66/32.png) [@anon40688970](https://community.mp3tag.de/u/anon40688970)
#### Post date: [April 19, 2011, 11:34am UTC](https://community.mp3tag.de/t/websource-silently-fails-on-syntax-error-in-parserscriptalbum-part/11821/7 "2011-04-19T11:34:57Z")

</div>

Yes, as a non-Notepad++ user I would appreciate a standard logfile that i could check. In the meantime I found another example causing this effect:

```
        moveline 0

```

which I tried as a shortcut of

```
        moveline -1
        moveline 1

```

I'm using this to reset the input buffer back to its original state.

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [April 19, 2011, 1:16pm UTC](https://community.mp3tag.de/t/websource-silently-fails-on-syntax-error-in-parserscriptalbum-part/11821/8 "2011-04-19T13:16:48Z")

</div>

> [@anon40688970](#):
>
> ...  
> moveline 0  
> which I tried as a shortcut of  
> moveline -1  
> moveline 1  
> I'm using this to reset the input buffer back to its original state.

Please explain ... how can a 'moveline' command reset the input buffer to its original state, and what was the original state?

DD.20110419.1717.CEST

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [April 19, 2011, 1:43pm UTC](https://community.mp3tag.de/t/websource-silently-fails-on-syntax-error-in-parserscriptalbum-part/11821/9 "2011-04-19T13:43:00Z")

</div>

> [@DetlevD](#):
>
> Please explain ... how can a 'moveline' command reset the input buffer to its original state, and what was the original state?

all _replace_ and _regexprepalce_ command are "reseted" if you use a _moveline_ command which brings you back to the same line.

---

<div class="post-metadata">

### Author: ![anon40688970](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/898d66/32.png) [@anon40688970](https://community.mp3tag.de/u/anon40688970)
#### Post date: [April 19, 2011, 2:08pm UTC](https://community.mp3tag.de/t/websource-silently-fails-on-syntax-error-in-parserscriptalbum-part/11821/10 "2011-04-19T14:08:04Z")

</div>

> [@pone](#):
>
> all _replace_ and _regexprepalce_ command are "reseted" if you use a _moveline_ command which brings you back to the same line.

Yeah, this is one of the many missing things that I would like to be part of the documentation. As you've stated in the other thread, it _is_ quite useful in some situations, indeed.

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [April 19, 2011, 2:12pm UTC](https://community.mp3tag.de/t/websource-silently-fails-on-syntax-error-in-parserscriptalbum-part/11821/11 "2011-04-19T14:12:08Z")

</div>

> [@pone](#):
>
> all _replace_ and _regexprepalce_ command are "reseted" if you use a _moveline_ command which brings you back to the same line.

So this situation can be understood as ...  
... leaving the current line buffer by 'moveline' to anywhere implies to leave resp. to close the current line buffer and open a new line buffer for the new target line.  
Just returning to the working line from before, will even cause a fresh new line buffer.  
I tend to say ... there is no _reset_ coupled to the 'moveline' command, but only a fresh initializing of the line buffer.

Executing 'moveline' to a line _zero_ seems not to be valid, but this might be a matter how lines are counted in the file, zero based resp. one based.  
Maybe a line buffer cannot be created for a line zero (which may not exist, respectively, which regulary does not exist), so that causes a runtime error.

DD.20110419.1812.CEST

---

<div class="post-metadata">

### Author: ![anon40688970](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/898d66/32.png) [@anon40688970](https://community.mp3tag.de/u/anon40688970)
#### Post date: [April 20, 2011, 10:27pm UTC](https://community.mp3tag.de/t/websource-silently-fails-on-syntax-error-in-parserscriptalbum-part/11821/12 "2011-04-20T22:27:38Z")

</div>

> [@DetlevD](#):
>
> Executing 'moveline' to a line _zero_ seems not to be valid, but this might be a matter how lines are counted in the file, zero based resp. one based.  
> Maybe a line buffer cannot be created for a line zero (which may not exist, respectively, which regulary does not exist), so that causes a runtime error.

Moveline is relativ (up or down), gotoline uses absolute line numbers. Thats why i tried moveline 0, to get back the unmodified buffer without actually changing the line. Anyway, my point was that I would like to get some info, why the script execution has been aborted.
