[SOLVED] Whats wrong with this sitemap here?

My Sitemap randomly stopped working, why does this error occur?? :frowning:
.logs:
2019-01-16 15:23:18.922 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model ‘smarthome.sitemap’ has errors, therefore ignoring it: [1,1]: extraneous input ‘’ expecting ‘sitemap’

smarthome.sitemap:

sitemap smarthome label="Mein SmartHome"
{
      Frame label="test" {
            Switch item=gLights
      }
}

Do you have an item gLights?

Tested that sitemap code you pasted and it works fine. How are you editing this file?

of course

VS code with the extensions.
I pasted it my complete sitemap into a different file with another name and it’s all working again.
I know OpenHAB is a complex and large system with all kind of components working together but damn, it’s having strange bugs sometimes …

At first did you create this file by copypasting or did you create a new blank file a wrote it by hand? And are you using samba shares?

Good to hear :+1:

Yes they are strange sometimes but mostly explainable after little digging and debugging.

created a new file and copy and pasted everything into it with a different sitemap name
yes samba :slight_smile:

that’s true :slight_smile:

Ok. There’s been some discussion about problems when copying and pasting code. Some hidden characters might slip in or quotation goes wrong and cause problems like this. I’ll count this “bug” being one of those. But glad it’s sorted.

My 2 cents:
You created a new file with the extension “.sitemap”, at this moment openhab had access to it and it was empty. The warning said the openhab would have expected “sitemap” in position line1 character 1. Does that ring a bell?

To avoid such create and or change such files in a directory NOT used by openhab and paste the complete file into the correct location after doing all changes.

1 Like

But I’ve created it after I got the error in my top thread, that’s why I’ve created a new one to troubleshot.

No, it really doesn’t makes sense to me, since to that time only the smarthome.sitemap and readme.txt was available in my /sitemaps directory …

Thanks for the hint (Y), I really hadn’t any problems with sitemaps until this day.
But it was after upgrading the OH Version, maybe some of the configuration in the backend were corrupt or whatever, it runs! :slight_smile:

So you did an update! Such would have been a information you should give when posting such questions. As of the original post you got the WARN without changing anything.
From which version did you update? ( A couple of updates ago there was a major change in the way setup files were checked, resulting in lots of those messages on systems which had been running without WARNs ).