Unexpected token


#1

Hello again!

So after loads of hours of developing my website i have ran into the greatest error in the world.

Error: While parsing config: (1, 1): unexpected token

error

I have no idea where this horror is coming from.

I was just running last tests, everything was running okay.

as you can see my config should be very well in order, i have made a new fresh installment of the hugo-icon pack twice now and transfered my old toml into and back out of and nothing is budging.

Where else should i look in?


#2

Show us your full config.toml file as code, not as a screenshot.


#3
# Main config file for icon theme.
theme = "hugo-icon"
languageCode = "en-AU"
title = "TRENET | IT & IDEE"

# Metadata
[params]
  author = "Eric Talviste"
  description = "Trenet IT lahendused!"

# Hero section (from here on is for icon theme)
[params.hero]
  img = "images/web_background3.jpg"
  title = "Loome koos uue ja parema IT-maailma"
  description = "TRENET IT & IDEE - Terviklikud IT-lahendused"

# Navigation section
[params.nav]
  mission = "Teenused"
  services = "Tooted"
  team = "Meeskond"
  contact = "Võta ühendust"
  offers = "Pakkumised"
  # Include logo instead if HOME:
  logo = "images/trenet-logo-colored.svg"

# Mission section
[params.mission]
  enable = true

  [params.mission.images]
    enable = true

    [[params.mission.images.list]]
      img = "images/stock_1.jpg"
    [[params.mission.images.list]]
      img = "images/stock_2.jpg"
    [[params.mission.images.list]]
      img = "images/stock_3.jpg"
    [[params.mission.images.list]]
      img = "images/stock_4.jpg"

  
  [[params.mission.item]]
    weight = 1
    name = "Pangalink"
    title = "Pangalink "
    subtitle = "Pangalink on makselahenduse installeerimine (loomine) kaupmehe e-poele."
    description = "Pakume pangalingi loomist Eestis tegutse-vatesse pankadesse ning erinevaid krediitkaardi makselahendusi.<ul class='checked' style='columns: 2'> <li> SEB </li> <li> Swedbank </li> <li> Sampo </li> <li> Nordea </li> <li> PayPal </li> <li> Visa </li> <li> MasterCard </li> </ul> <p><a href='#' class='btn btn-info btn-outline fh5co-content-nav'>Uuri Hinnakirja</a></p>"

  [[params.mission.item]]
    weight = 2
    name = "Hansaworld"
    title = "Hansaworld" 
    subtitle = "HansaWord tarkvara majutust pakub TRENET AS koostöös Excellent Business Solutions Eesti AS-ga."
    description = "Raamatupidamistarkvara majutusteenus, mis on kättesaadav 24/7 ning raamatupidaja võib teha tööd sõltumata asukohast. Vajalik on ainult internetiühendus. </p><ul class='checked'><li>kulude täpne prognoosimine, kuna teenusel on fikseeritud hind;</li><li>varukoopiate tegemine on garanteeritud;</li><li>puudub vajadus oma serverile, puuduvad selle hooldus- ja ülalpidamiskulud.</li></ul><p><a href='#' class='btn btn-info btn-outline fh5co-content-nav'>Uuri Lähemalt</a> <a href='#' class='btn btn-primary btn-outline fh5co-content-nav'>HINNAKIRI</a></p>"

    # BUTTON
    # <a href='#' class='btn btn-info btn-outline fh5co-content-nav'>Uuri Lähemalt</a>

  [[params.mission.item]]
    weight = 3
    name = "Trenet kaugjuht tarkvara"
    title = "TRENET.EXE"
    subtitle = "Lihtsamate arvutiga seonduvate probleemide lahendamiseks pakub TRENET arvutiabi kaughalduse korras. Kaughaldustarkvara on kasutaja arvutile ohutu, ei sisalda viiruseid, nuhkvara ega reklaamvara."
    description = "Kaughalduse toimimise ainsaks kriteeriumiks on toimiv internetiühendus. Arusaadavalt peab teie arvuti olema sisselülitatud. Kaughalduse sessiooni algatab alati klient. Iseseisvalt ei ole TRENET'il võimalik kaughaldust kliendi arvutis käivitada.<p><a href='#' class='btn btn-info btn-outline fh5co-content-nav'>Uuri Lähemalt</a> <a href='#' class='btn btn-primary btn-outline fh5co-content-nav'>HINNAKIRI</a></p>"

# Services section
[params.services]
  enable = true
  video = true
  title = "Meie Tooted"
  vidlink = "https://www.youtube.com/watch?v=5y2GolcfFT0"
  description = "Trenet pakub laia valikut erinevate tehnoloogia toodete seas"

  [[params.services.item]]
    icon = "icon-present"
    title = "<a href='#' class='btn btn-primary btn-outline'>NOD 32</a>"
    description = "Auhinnatud ThreatSense® mootoril põhinev viirusetõrjetarkvara ESET NOD32 avastab ja teeb kahjutuks ennetavalt rohkem viirusi ja muid Interneti-ohte kui ükski teine saadaolev programm."

  [[params.services.item]]
    icon = "icon-eye"
    title = "<a href='#' class='btn btn-primary btn-outline'>Finjan</a>"
    description = "M86 Security (Finjan) pakub tooteid turvalise internetilüüsi tarbeks ärikasutajatele. Kasutusel on patendeeritud aktiivne reaalajas toimiv kontrolltehnoloogia."

  [[params.services.item]]
    icon = "icon-paper-plane"
    title = "<a href='#' class='btn btn-primary btn-outline'>Sophos</a>"
    description = "Üle 100 miljoni kasutaja poolt usaldatud ja turvalisuse ekspertide poolt pikaajaliste liidrite Mcafee ja Symantec'i tõsiseltvõetavaks alternatiiviks tunnistatud Sophos pakub oma mitmete turvatoodete kaudu parimat kaitset tänapäeva kirjus IT-maailmas"

  [[params.services.item]]
    icon = "icon-pencil"
    title = "<a href='#' class='btn btn-primary btn-outline'>SCM & Identive</a>"
    description = "Identive'i (SCM Microsystems) kaardilugejate abil saad kasutada ID-kaardi elektroonilisi funktsione nagu autentimine pangas, dokumentide digitaalne allkirjastamine jpm."

  [[params.services.item]]
    icon = "icon-rocket"
    title = "<a href='#' class='btn btn-primary btn-outline'>Avast</a>"
    description = "avast! Home Edition on paljude testide põhjal parim tasuta viirusetõrje, mis ületab oma näitajatega isegi mitmeid hästituntud tasulisi viirusetõrjeprogramme."

  [[params.services.item]]
    icon = "icon-support"
    title = "<a href='#' class='btn btn-primary btn-outline'>DELL</a>"
    description = "TRENET on Dell'i registreeritud partner (Dell Registered Partner, consumer and small business)."



# Work section
[params.work]
  enable = true

  [[params.work.item]]
    title = "Consectetur adipisicing"
    subtitle = "Ram"
    img = "images/stock_1.jpg"

  [[params.work.item]]
    title = "Consectetur adipisicing"
    subtitle = "Gigabyte"
    img = "images/stock_2.jpg"

  [[params.work.item]]
    title = "Consectetur adipisicing"
    subtitle = "Cooler"
    img = "images/stock_3.jpg"

  [[params.work.item]]
    title = "Consectetur adipisicing"
    subtitle = "Server"
    img = "images/stock_4.jpg"

  [[params.work.item]]
    title = "Consectetur adipisicing"
    subtitle = "Server"
    img = "images/stock_4.jpg"

  [[params.work.item]]
    title = "Consectetur adipisicing"
    subtitle = "Cooler"
    img = "images/stock_3.jpg"

  [[params.work.item]]
    title = "Consectetur adipisicing"
    subtitle = "Gigabyte"
    img = "images/stock_2.jpg"

  [[params.work.item]]
    title = "Consectetur adipisicing"
    subtitle = "Ram"
    img = "images/stock_1.jpg"

# Team section
[params.team]
  enable = false
  title = "Meet The Team"
  description = "Lorem ipsum dolor sit amet consectetur adipisicing elit. Eveniet nam itaque ipsam iste provident quo ipsam iste provident."

  [[params.team.item]]
    name = "Jean Doe"
    position = "Chief legend"
    description = "Lorem ipsum dolor sit amet consectetur adipisicing elit. Eveniet nam itaque ipsam iste provident quo ipsam iste provident."
    img = "images/person1.jpg"
    facebook = "#"
    twitter = "#"
    dribbble = "#"
    instagram = "#"
    github = "#"
    linkedin = "#"

  [[params.team.item]]
    name = "Alice Doe"
    position = "Chief overlord"
    description = "Lorem ipsum dolor sit amet consectetur adipisicing elit. Eveniet nam itaque ipsam iste provident quo ipsam iste provident."
    img = "images/person2.jpg"
    facebook = "#"
    twitter = "#"
    dribbble = "#"
    instagram = "#"
    github = "#"

  [[params.team.item]]
    name = "John Doe"
    position = "Chief haranguer"
    description = "Lorem ipsum dolor sit amet consectetur adipisicing elit. Eveniet nam itaque ipsam iste provident quo ipsam iste provident."
    img = "images/person3.jpg"
    facebook = "#"
    twitter = "#"
    dribbble = "#"
    instagram = "#"
    github = "#"

# Offers section
[params.offers]
  enable = true
  title = "Meie Pakkumised"
  description = "Trenet'i Pakkumised"

  [[params.offers.item]]
    title = "Miks praegusel Hansaraama kliendil tasub ĂĽle minna Standard Books'ile KOHE?"
    description = "Kui olete"

    [[params.offers.item]]
    title = "Miks praegusel Hansaraama kliendil tasub ĂĽle minna Standard Books'ile KOHE?"
    description = "Kui olete Hansaraama litsentsiomanik ja Teil on kehtiv arendusleping, pakume Standard Books'i hinnakirjajärgsetest hindadest allahindlust 50%! Kui olete hetkel Hansaraama rentija, siis Standard Books'i rendile üleminekul igakuised rendimakse Teie jaoks ei suurene!Kui olete Hansaraama litsentsiomanik ja Teil on kehtiv arendusleping, pakume Standard Books'i hinnakirjajärgsetest hindadest allahindlust 50%! Kui olete hetkel Hansaraama rentija, siis Standard Books'i rendile üleminekul igakuised rendimakse Teie jaoks ei suurene!Kui olete Hansaraama litsentsiomanik ja Teil on kehtiv arendusleping, pakume Standard Books'i hinnakirjajärgsetest hindadest allahindlust 50%! Kui olete hetkel Hansaraama rentija, siis Standard Books'i rendile üleminekul igakuised rendimakse Teie jaoks ei suurene!Kui olete Hansaraama litsentsiomanik ja Teil on kehtiv arendusleping, pakume Standard Books'i hinnakirjajärgsetest hindadest allahindlust 50%! Kui olete hetkel Hansaraama rentija, siis Standard Books'i rendile üleminekul igakuised rendimakse Teie jaoks ei suurene!Kui olete Hansaraama litsentsiomanik ja Teil on kehtiv arendusleping, pakume Standard Books'i hinnakirjajärgsetest hindadest allahindlust 50%! Kui olete hetkel Hansaraama rentija, siis Standard Books'i rendile üleminekul igakuised rendimakse Teie jaoks ei suurene!Kui olete Hansaraama litsentsiomanik ja Teil on kehtiv arendusleping, pakume Standard Books'i hinnakirjajärgsetest hindadest allahindlust 50%! Kui olete hetkel Hansaraama rentija, siis Standard Books'i rendile üleminekul igakuised rendimakse Teie jaoks ei suurene!"

     [[params.offers.item]]
    title = "Miks praegusel Hansaraama kliendil tasub ĂĽle minna Standard Books'ile KOHE?"
    description = "Kui olete Hansaraama litsentsiomanik ja Teil on kehtiv arendusleping, pakume Standard Books'i hinnakirjajärgsetest hindadest allahindlust 50%! Kui olete hetkel Hansaraama rentija, siis Standard Books'i rendile üleminekul igakuised rendimakse Teie jaoks ei suurene!"


# Contact section
[params.contact]
  enable = true
  title = "Võta ühendust"
  message = "Olete huvitatud mõnest teenusest? Või soovite uurida veel lähemalt? Võtke Ühendust!"
  name_placeholder = "Nimi"
  email_placeholder = "Email"
  email_disclaimer = "Me ei jaga teie poolt usaldatud andmeid"
  message_placeholder = "Sõnum"
  button_text = "Saada"

# Footer section
# Note here that the copyright and attribution statement must remain as part of the license agreement. If you wish to remove this, please contact freehtml5 and pay for a professional license.
[params.footer]
  enable = true
  note = "<p><small>&copy; 2016 Free HTML5 Template. All Rights Reserved. <br> Designed by <a href='http://freehtml5.co/' target='_blank'>FreeHTML5.co</a> Demo Images: <a href='http://pexels.com/' target='_blank'>Pexels</a><br>Hugo port by <a href='https://github.com/SteveLane/' target='_blank'>SteveLane</a><br>Modified and Designed by <a href='https://github.com/EricTalv/' target='_blank'>EricTalviste</a> </small></p>"
  github = "#"
  twitter = "#"
  facebook = "#"
  vine = "#"
  linkedin = "#"
  instagram = "#"

#4

it seems that it has also messed up the UTF-8 or whatever, all my Õ’s and Ö’s are replaced by question marks


#5

This seems to be even a bigger issue, even though In my header.html partial i have a clear utf-8 meta tag, its still showing them up as question marks


#6

Well the unexpected token miracuasly has disappeared, now my UTF-8 characters arent showing up.


#7

Alas!!! I figured out why it was showing me that error!

My .toml file was in UTF-8 encoding, thus it didnt work, but how is that possible?

From start to finish with the hugo-icon ive used utf-8 characters, only up until now i figured out that the toml file should be in somekind of encoding… how?!


#8

No, I’ve used UTF-8 for all my files for years. Sounds like something else munging up that file.

What editor are you using?


#9

I use mainly sublime but quick edits in notepad.

I changed the file from ANSI and UTF and whenever it was in UTF it threw the token error.

I also feel that theres something else going on since one haven’t been dealing with any encodings up until now


#10

If you mean the Notepad that comes free with Windows, it’s known to mess with files. I would not use it ever.


#11

for quick edits switch from notepad to notepad++ :sunglasses:


#12

Concur. My employees use this w/ no such file-munging trouble.


#13

Heya!

Sorry to keep you’s waiting.

And indeed you were right, windows notepad is a no-no for editing files!

I wonder why though


#14

It’s been a problem for years. Just say no. :slight_smile:


#15

Notepad defaults to ANSI encoding so it has to “guess” when it doesn’t understand certain UTF-8 items (that’s the weird symbols you saw).


#16

Maybe in another 30 years it will do Unicode.


#17

Ha, I knew it’d been long but… wow.