Tag start is not closed ошибка

In my HTML page, I am getting an error Tag start is not closed after the .jpg
Here’s the code:

{% load staticfiles %}

<figure>
  <img src="{% static "FLC image.jpg" %}" alt="The Pulpit Rock" width="304" height="228">
</figure>

What is wrong with code ?

asked Oct 11, 2019 at 7:00

Yantra Logistics's user avatar

4

You can close the image tag. Try the below code.

{% load staticfiles %}

<figure>
  <img src="{% static "FLC image.jpg" %}" alt="The Pulpit Rock" width="304" height="228"/>
</figure>

answered Oct 11, 2019 at 7:06

Pushprajsinh Chudasama's user avatar

That doesn’t affect the loading of the page, its because of PyCharm IDE. You can still run the runserver command and get the desired output.

If you are using the closing tags then your error will be gone but you wont get the desired output.

{% load staticfiles %}
    </img {% static "FLC image.jpg" %}" alt="The Pulpit Rock" width="304" height="228">

(or)

 {% load staticfiles %}
    <img {% static "FLC image.jpg" %}" alt="The Pulpit Rock" width="304" height="228" />

If you are using recent versions of Django try replacing {% load staticfiles %} with
{ %load static % }

So finally use the below code to get your desired result

{% load static %}
    <img {% static "FLC image.jpg" %}" alt="The Pulpit Rock" width="304" height="228" >

answered Jan 7, 2021 at 7:03

Panyam Praneeth Reddy 's user avatar

I’m making a small app to copy a link of a video from the intent menu, but when i try to compile the app, i get the error «tag start is not closed» in my androidmanifest:

the error appears at the end of line 10. Thanks in advance for any replies!

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.reshare.copyurl">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@android:style/Theme.NoDisplay"
        <activity
            android:name=".MainActivity"
            android:excludeFromRecents="true">
            <intent-filter>
                <action android:name="android.intent.action.SEND" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="text/plain" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW"/>
                <category android:name="android.intent.category.DEFAULT"/>
                <category android:name="android.intent.category.BROWSABLE"/>
                <data android:scheme="rtsp"/>
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW"/>
                <category android:name="android.intent.category.DEFAULT"/>
                <category android:name="android.intent.category.BROWSABLE"/>
                <data android:scheme="http"/>
                <data android:scheme="https"/>
                <data android:scheme="content"/>
                <data android:mimeType="video/mpeg4"/>
                <data android:mimeType="video/mp4"/>
                <data android:mimeType="video/3gp"/>
                <data android:mimeType="video/3gpp"/>
                <data android:mimeType="video/3gpp2"/>
                <data android:mimeType="video/webm"/>
                <data android:mimeType="video/avi"/>
                <data android:mimeType="application/sdp"/>
            </intent-filter>
            <intent-filter> !-- HTTP live support -->;
                <action android:name="android.intent.action.VIEW"/>
                <category android:name="android.intent.category.DEFAULT"/>
                <category android:name="android.intent.category.BROWSABLE"/>
                <data android:scheme="http"/>
                <data android:scheme="https"/>
                <data android:mimeType="audio/x-mpegurl"/>
                <data android:mimeType="audio/mpegurl"/>
                <data android:mimeType="application/vnd.apple.mpegurl"/>
                <data android:mimeType="application/x-mpegurl"/>
            </intent-filter>
        </activity>
    </application>

</manifest>

asked Jun 1, 2016 at 7:56

jon's user avatar

3

You are missing >

Change this part:

 <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@android:style/Theme.NoDisplay"

by adding a > like this:

 <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@android:style/Theme.NoDisplay">

answered Jun 1, 2016 at 7:58

Nongthonbam Tonthoi's user avatar

1

<!-- Comment --> is the way to add comments in an XML file. Doesn’t that actually means, that this part is not «compiled»?

However, when I do something like this:

<item android:id="@+id/ss3"
    android:icon="@drawable/some_icon"
    android:title="Blabla Title"
    tools:ignore="AppCompatResource"
    <!-- -->
/>

I get an error «Tag start is not closed». Why?

Tag start not closed error DJango

Im trying to load an authentication view and writing the base.html file but on line ten, this errror will not go away. I have tried everything including looking at the source code. I cant figure it out I think i still just have to folder structure wrong which is abit confusing with django. Can anyone help me out. I suppose im suppose to have created a static/css/ folder with a base.css file but it still wont go away. Maybe this picture will help.

Archived post. New comments cannot be posted and votes cannot be cast.

Hi.

the problem I’m having with my code is line 16
<input type=»radio» id=»{{ color }}» name=»colors» value=»{{ color }}»
{% if saves.get(‘color’) == color %}checked{% endif %}>

I get an error saying tag start is not closed. Can some one help me with this?

{% extends "layout.html" %}

{% block content %}
<!--Build Area -->
<form action="" method="POST" class="wrap no-top">
    <div class="grid-100 row">
        <div class="grid-30">
            <div class="title">
                <input type="text" name="name" value="{{ saves.get('name', '') }}">
            </div>
        </div>
        <div class="grid-70">
            <div class="colors">
                {% for color in options['colors'] %}
                    <input type="radio" id="{{ color }}" name="colors" value="{{ color }}"
                           {% if saves.get('color') == color %}checked{% endif %}>
                    <label for="{{ color }}"></label>
                {% endfor %}
                <button class="btn">Update</button>
            </div>
        </div>
        <div id="bear" class="grid-100">
            <div class="bear-body"><img src="/static/img/bear_body.svg" /></div>
            <div class="head"><img src="/static/img/bear_face.svg" /></div>
            <div class="nose"><img src="/static/img/bear_nose.svg" /></div>
        </div>
        <div class="items">
        </div>
    </div>
</form>

{% endblock %}

1 Answer

Mel Rumsey

seal-mask

STAFF

Hey Daniel Mohr!
I am taking a look at the code for the section you are on and it looks like there might be an issue with code that is written in the layout.html file.
I used your code from the builder.html and while the line is red, it isn’t what is throwing the error on my end. Check your layout.html file and see if it looks similar to this:

        <div class="wrap no-bottom messages bg-{{ saves.get('colors', 'black') }}">
            {% with messages = get_flashed_messages() %}
            {% if messages %}
            <ul class="flashes">
                {% for message in messages %}
                <li>{{ message }}</li>
                {% endfor %}
            </ul>
            {% endwith %}
        </div>

If so, there needs to be an endif to close out the if statement right above the endwith. Give that a try. If that doesn’t solve the problem, send over a snapshot link to your workspace and I can dig into your code and see what the issue might be.

Create an account to follow your favorite communities and start taking part in conversations.

r/django

Posted by10 months ago

Archived

Im trying to load an authentication view and writing the base.html file but on line ten, this errror will not go away. I have tried everything including looking at the source code. I cant figure it out I think i still just have to folder structure wrong which is abit confusing with django. Can anyone help me out. I suppose im suppose to have created a static/css/ folder with a base.css file but it still wont go away. Maybe this picture will help.

r/django - Tag start not closed error DJango

This thread is archived

New comments cannot be posted and votes cannot be cast

level 1

If you’ve been following this sub for even a short while you should realize by now the benefits of posting your actual correctly-formatted code here, so I’m not going to re-iterate them. So please, post your code. Screenshots look great as wallpaper, but are pretty much useless for code diagnosis and investigation.

level 1

Has that always been this way in python or is it a new change in the tut I’m looking at and in GitHub it has double quotes and it’s still not loading the right css . Thanks for your help

level 2

It did take the error away in the ide though

level 1

<link href="{% static 'css/base.css' %}" rel="stylesheet">

level 2

singles quotes ? lets see if that works

About Community

Subreddit Icon

News and discussion about the Django web framework.



Hi, I assume that registering *.html to the handlebars/mustache plugin wouldn’t be a terribly good idea. So I guess that I’m
experiencing this because handlebars section are inserted within

<script type=»text/x-handlebars» data-template-name=»todos/index»> … </script> tags within an html file.

Not an expert at this, so I guess closing the ticket is the right way to go.
Will read a few more sections of the ember.js tutorial, before bothering at all another time.
In any case, thanks,
Guglielmo

Il giorno 23/dic/2013, alle ore 18:04, Daniel Marcotte notifications@github.com ha scritto:

Hey @guglielmo, I was only able to reproduce this problem by disabling the plugin, so here’s my hunch about what’s going on:

It looks like the Handlebars/Mustache plugin is not active for the file you’re getting these errors in (does your file icon have a mustache on an orange background? If not, the plugin is definitely not active). You should be able to fix that by ensuring that your file pattern is associated with the plugin in Preferences…->File Types.

Optimistically closing this, but if this doesn’t get you fixed up, or you have follow-up questions, please let me know!


Reply to this email directly or view it on GitHub.

Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Hi.

the problem I’m having with my code is line 16
<input type=»radio» id=»{{ color }}» name=»colors» value=»{{ color }}»
{% if saves.get(‘color’) == color %}checked{% endif %}>

I get an error saying tag start is not closed. Can some one help me with this?

{% extends "layout.html" %}

{% block content %}
<!--Build Area -->
<form action="" method="POST" class="wrap no-top">
    <div class="grid-100 row">
        <div class="grid-30">
            <div class="title">
                <input type="text" name="name" value="{{ saves.get('name', '') }}">
            </div>
        </div>
        <div class="grid-70">
            <div class="colors">
                {% for color in options['colors'] %}
                    <input type="radio" id="{{ color }}" name="colors" value="{{ color }}"
                           {% if saves.get('color') == color %}checked{% endif %}>
                    <label for="{{ color }}"></label>
                {% endfor %}
                <button class="btn">Update</button>
            </div>
        </div>
        <div id="bear" class="grid-100">
            <div class="bear-body"><img src="/static/img/bear_body.svg" /></div>
            <div class="head"><img src="/static/img/bear_face.svg" /></div>
            <div class="nose"><img src="/static/img/bear_nose.svg" /></div>
        </div>
        <div class="items">
        </div>
    </div>
</form>

{% endblock %}

1 Answer

Mel Rumsey

seal-mask

STAFF

Hey Daniel Mohr!
I am taking a look at the code for the section you are on and it looks like there might be an issue with code that is written in the layout.html file.
I used your code from the builder.html and while the line is red, it isn’t what is throwing the error on my end. Check your layout.html file and see if it looks similar to this:

        <div class="wrap no-bottom messages bg-{{ saves.get('colors', 'black') }}">
            {% with messages = get_flashed_messages() %}
            {% if messages %}
            <ul class="flashes">
                {% for message in messages %}
                <li>{{ message }}</li>
                {% endfor %}
            </ul>
            {% endwith %}
        </div>

If so, there needs to be an endif to close out the if statement right above the endwith. Give that a try. If that doesn’t solve the problem, send over a snapshot link to your workspace and I can dig into your code and see what the issue might be.

На странице статьи есть блок комменатриев, у которого есть селектор сортировки. Параметр сортировки передаётся через view. Хочу сделать так, чтобы атрибут selected проставлялся в нужный тег option в зависимости от этого параметра. Делаю это так:

<select id="comments-sort">
    <option value="comment_datetime" {% if sort == "comment_datetime" %}selected{% endif %}>Сначала старые</option>
    <option value="-comment_datetime" {% if sort == "-comment_datetime" %}selected{% endif %}>Сначала новые</option>
    <option value="-rating_sum" {% if sort == "-rating_sum" %}selected{% endif %}>Рейтинг по-убыванию</option>
    <option value="rating_sum" {% if sort == "rating_sum" %}selected{% endif %}>Рейтинг по-возрастанию</option>
</select>

И этот код работает, но проблема в том, что PyCharm ругается на этот код с сообщением Tag start is not closed и даёт warning Attribute {% is not allowed here:
введите сюда описание изображения
И вот у меня вопрос, это PyCharm неправомерно выпендривается, или моя ошибка всё-таки где-то есть?

Back to Top

<!-- Comment --> is the way to add comments in an XML file. Doesn’t that actually means, that this part is not «compiled»?

However, when I do something like this:

<item android:id="@+id/ss3"
    android:icon="@drawable/some_icon"
    android:title="Blabla Title"
    tools:ignore="AppCompatResource"
    <!-- -->
/>

I get an error «Tag start is not closed». Why?

Does XML have a closing tag?

All XML Elements Must Have a Closing Tag This is not an error.

How do you end a tag in XML?

The end tag functions exactly like a right parenthesis or a closing quotation mark or a right curly brace. It contains no data of its own; it simply ends the most recent (innermost) tag with the same name. XML requires a matching end tag for each start tag.

What is start tag in XML?

XML data is a serial stream. The start tag informs the receiving software that all the incoming data will belong to this element until the matching end tag is encountered. Very often, more start tags are encountered before the end tag.

Comments are not allowed inside tags. You have to close the tag first with «>» or «/>» and then you can add your comment there.

На странице статьи есть блок комменатриев, у которого есть селектор сортировки. Параметр сортировки передаётся через view. Хочу сделать так, чтобы атрибут selected проставлялся в нужный тег option в зависимости от этого параметра. Делаю это так:

<select id="comments-sort">
    <option value="comment_datetime" {% if sort == "comment_datetime" %}selected{% endif %}>Сначала старые</option>
    <option value="-comment_datetime" {% if sort == "-comment_datetime" %}selected{% endif %}>Сначала новые</option>
    <option value="-rating_sum" {% if sort == "-rating_sum" %}selected{% endif %}>Рейтинг по-убыванию</option>
    <option value="rating_sum" {% if sort == "rating_sum" %}selected{% endif %}>Рейтинг по-возрастанию</option>
</select>

И этот код работает, но проблема в том, что PyCharm ругается на этот код с сообщением Tag start is not closed и даёт warning Attribute {% is not allowed here:
введите сюда описание изображения
И вот у меня вопрос, это PyCharm неправомерно выпендривается, или моя ошибка всё-таки где-то есть?

Вернуться на верх

In my HTML page, I am getting an error Tag start is not closed after the .jpg
Here’s the code:

{% load staticfiles %}

<figure>
  <img src="{% static "FLC image.jpg" %}" alt="The Pulpit Rock" width="304" height="228">
</figure>

What is wrong with code ?

asked Oct 11, 2019 at 7:00

What is wrong with code ?

asked Oct 11, 2019 at 7:00

Yantra Logistics's user avatar

4

You can close the image tag. Try the below code.

{% load staticfiles %}

<figure>
  <img src="{% static "FLC image.jpg" %}" alt="The Pulpit Rock" width="304" height="228"/>
</figure>

answered Oct 11, 2019 at 7:06

Pushprajsinh Chudasama's user avatar

That doesn’t affect the loading of the page, its because of PyCharm IDE. You can still run the runserver command and get the desired output.

If you are using the closing tags then your error will be gone but you wont get the desired output.

{% load staticfiles %}
    </img {% static "FLC image.jpg" %}" alt="The Pulpit Rock" width="304" height="228">

(or)

 {% load staticfiles %}
    <img {% static "FLC image.jpg" %}" alt="The Pulpit Rock" width="304" height="228" />

If you are using recent versions of Django try replacing {% load staticfiles %} with
{ %load static % }

So finally use the below code to get your desired result

{% load static %}
    <img {% static "FLC image.jpg" %}" alt="The Pulpit Rock" width="304" height="228" >

answered Jan 7, 2021 at 7:03

Panyam Praneeth Reddy 's user avatar

<!-- Comment --> is the way to add comments in an XML file. Doesn’t that actually means, that this part is not «compiled»?

However, when I do something like this:

<item android:id="@+id/ss3"
    android:icon="@drawable/some_icon"
    android:title="Blabla Title"
    tools:ignore="AppCompatResource"
    <!-- -->
/>

I get an error «Tag start is not closed». Why?

Andrew T.'s user avatar

Andrew T.

4,6918 gold badges43 silver badges62 bronze badges

asked Sep 7, 2014 at 21:32

user3801167's user avatar

Comments are not allowed inside tags. You have to close the tag first with «>» or «/>» and then you can add your comment there.

answered Sep 7, 2014 at 21:38

Miro Lehtonen's user avatar

2

<!-- Comment --> is the way to add comments in an XML file. Doesn’t that actually means, that this part is not «compiled»?

However, when I do something like this:

<item android:id="@+id/ss3"
    android:icon="@drawable/some_icon"
    android:title="Blabla Title"
    tools:ignore="AppCompatResource"
    <!-- -->
/>

I get an error «Tag start is not closed». Why?

Tag start not closed error DJango

Im trying to load an authentication view and writing the base.html file but on line ten, this errror will not go away. I have tried everything including looking at the source code. I cant figure it out I think i still just have to folder structure wrong which is abit confusing with django. Can anyone help me out. I suppose im suppose to have created a static/css/ folder with a base.css file but it still wont go away. Maybe this picture will help.

Archived post. New comments cannot be posted and votes cannot be cast.

Hi.

the problem I’m having with my code is line 16
<input type=»radio» id=»{{ color }}» name=»colors» value=»{{ color }}»
{% if saves.get(‘color’) == color %}checked{% endif %}>

I get an error saying tag start is not closed. Can some one help me with this?

{% extends "layout.html" %}

{% block content %}
<!--Build Area -->
<form action="" method="POST" class="wrap no-top">
    <div class="grid-100 row">
        <div class="grid-30">
            <div class="title">
                <input type="text" name="name" value="{{ saves.get('name', '') }}">
            </div>
        </div>
        <div class="grid-70">
            <div class="colors">
                {% for color in options['colors'] %}
                    <input type="radio" id="{{ color }}" name="colors" value="{{ color }}"
                           {% if saves.get('color') == color %}checked{% endif %}>
                    <label for="{{ color }}"></label>
                {% endfor %}
                <button class="btn">Update</button>
            </div>
        </div>
        <div id="bear" class="grid-100">
            <div class="bear-body"><img src="/static/img/bear_body.svg" /></div>
            <div class="head"><img src="/static/img/bear_face.svg" /></div>
            <div class="nose"><img src="/static/img/bear_nose.svg" /></div>
        </div>
        <div class="items">
        </div>
    </div>
</form>

{% endblock %}

1 Answer

Mel Rumsey

seal-mask

STAFF

Hey Daniel Mohr!
I am taking a look at the code for the section you are on and it looks like there might be an issue with code that is written in the layout.html file.
I used your code from the builder.html and while the line is red, it isn’t what is throwing the error on my end. Check your layout.html file and see if it looks similar to this:

        <div class="wrap no-bottom messages bg-{{ saves.get('colors', 'black') }}">
            {% with messages = get_flashed_messages() %}
            {% if messages %}
            <ul class="flashes">
                {% for message in messages %}
                <li>{{ message }}</li>
                {% endfor %}
            </ul>
            {% endwith %}
        </div>

If so, there needs to be an endif to close out the if statement right above the endwith. Give that a try. If that doesn’t solve the problem, send over a snapshot link to your workspace and I can dig into your code and see what the issue might be.

Понравилась статья? Поделить с друзьями:
  • Tabletop simulator ошибка при запуске
  • Tabletop simulator ошибка при загрузке текстур
  • Table name is invalid ошибка
  • Table index is nil ошибка
  • Table has no index order set ошибка foxpro