# Goto line 1 doesn't exist

**URL:** https://community.mp3tag.de/t/goto-line-1-doesnt-exist/47769
**Category:** Fixed Bugs
**Tags:** bug-fixed
**Created:** [February 3, 2020, 11:22pm UTC](https://community.mp3tag.de/t/goto-line-1-doesnt-exist/47769 "2020-02-03T23:22:14Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [February 3, 2020, 11:22pm UTC](https://community.mp3tag.de/t/goto-line-1-doesnt-exist/47769/1 "2020-02-03T23:22:14Z")

</div>

Here's my bp script.

```auto
[Name]=beatport.com [v5.0 by stevehero™] (◣_◢)
[BasedOn]=https://www.beatport.com
[IndexUrl]=https://www.beatport.com/search/releases?q=%s&per-page=150&sort=release-desc
[AlbumUrl]=
[WordSeparator]=+
[IndexFormat]=% ↓ ID (◣_◢)™%|% ↓ RELEASE%|% ↓ ARTIST/S%|%_URL%
[Encoding]=url-utf-8
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#
[ParserScriptIndex]=...
findline "<!DOCTYPE html>"
findinline "<!DOCTYPE html>"
joinuntil "</html>"
replace "|" "$verticalBar()"
regexpreplace "(?i).*?window\.Playables\s*?=\s*?(\{.+);.*?window\.Sliders\s+=\s+\[.*" "$1"
json "ON" "current"
json_foreach "releases"
json_select "id" # ID
sayrest
say "|"
json_select "name" # RELEASES
sayrest
say "|"
json_select_many "artists" "name" " ● " # ARTIST(S)
sayrest
say "|"
say "https://www.beatport.com/release/" # PREVIEW
json_select "slug"
sayrest
json_select "id"
say "/"
sayrest
saynewline
json_foreach_end
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#
[ParserScriptAlbum]=...
debug "on" "C:\Users\yourusername\Desktop\debug album BEATPORT.html" # Place before headings to want to debug
gotoline 1

```

**Result in a debug error.**

`Aborted: ERROR(L53/gotoline): line does not exist`

Line 1 should always exist should it not?

* * *

I should mention that this throws this error when the `gotoline 1` is placed further down the code. I've removed that for clarity.

---

<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: [February 4, 2020, 10:37am UTC](https://community.mp3tag.de/t/goto-line-1-doesnt-exist/47769/2 "2020-02-04T10:37:55Z")

</div>

I think gotoline always fails when a line is empty. Not really useful since there is no error handling possible.  
I hope it gets changed, either no error on empty lines or allow gotoline 1 1 to ignore it.

---

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [February 4, 2020, 12:27pm UTC](https://community.mp3tag.de/t/goto-line-1-doesnt-exist/47769/3 "2020-02-04T12:27:23Z")

</div>

True. This leaves it kind of impossible to back track to the start. That is if there are instances where line 5 in beatports html pages is not the first line that's not empty in all cases.

The 1 1 trick will work if it returns or skips to the very 1st valid line that contains text. In my case 5.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [February 15, 2020, 2:44pm UTC](https://community.mp3tag.de/t/goto-line-1-doesnt-exist/47769/4 "2020-02-15T14:44:23Z")

</div>

This should be fixed with [Mp3tag v3.00a](https://community.mp3tag.de/t/455). It now doesn't fail on empty lines, only on lines that doesn't exist.

Thanks for pointing!

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [March 16, 2020, 2:44pm UTC](https://community.mp3tag.de/t/goto-line-1-doesnt-exist/47769/5 "2020-03-16T14:44:27Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
