CSS file doesnot link with python SDK Example Python-webserver

Hello, 

i tried out the python example of the python-webserver 

and well if you see it works correclty. I can write values in the data layer. So when i looked in the mark down file there is a picture with the stylesheet.css but in my case he doesn't want to link the css file included in /www/stylesheet.css.

i looked further in the code and copied the html file in a notepad. Then i created a file folder to my desktop i linked the stylsheet to the notepad data like this:

When i execute the html file in notepad it puts following results: 

I also changed some default values in the stylesheet.css to see if the linking is correct. 

So when i build the snap for the ctrlx Core Device I only get the first picture without the stylsheet.css linking. 

I got the python example webserver+datalayer from the sdk vers. 1.14.3. 

best regards 

UDK_developer

 

 

 

Best reply by nickH

Hello UDK_developer,

I got an update for you. We found a fix for this bug. It has something to do with how the parts of the snap are packed. 

You can just add these lines to the snapcraft.yaml. So that the application will later find the css-file at "$SNAP/www". 

 

...
parts:
...

  www:
    plugin: dump
    source: ./www
    organize:
      '*': "www/"

...

 

 

This is going to be included in the next release of the SDK. 

Best regards,

Nick 

View original
5 replies