Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ParseError: no element found: line 1, column 0 #948

Open
sentry-io bot opened this issue Feb 12, 2024 · 5 comments
Open

ParseError: no element found: line 1, column 0 #948

sentry-io bot opened this issue Feb 12, 2024 · 5 comments

Comments

@sentry-io
Copy link

sentry-io bot commented Feb 12, 2024

Sentry Issue: DJANGO-GIRLS-WEBSITE-69

ParseError: no element found: line 1, column 0
(2 additional frame(s) were not displayed)
...
  File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "story/management/commands/fetch_stories.py", line 24, in handle
    rss = ElementTree.fromstring(response.content)
@dostogircse171
Copy link
Contributor

@amakarudze Could you please provide me some context and information so I can work on fixing this issue?

@marksweb
Copy link
Collaborator

@dostogircse171 This is what we've got;

ParseError: no element found: line 1, column 0
  File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "story/management/commands/fetch_stories.py", line 24, in handle
    rss = ElementTree.fromstring(response.content)
  File "xml/etree/ElementTree.py", line 1345, in XML
    return parser.close()
Screenshot 2024-02-18 at 02 08 15

@dostogircse171
Copy link
Contributor

dostogircse171 commented Feb 18, 2024

Thank you @marksweb for the details.
I think it is better to add an exception handler to avoid this. What do you suggest?

I tried to reproduce it on localhost but couldn't get the issue.

Thank you

@marksweb
Copy link
Collaborator

@dostogircse171 yes I think handling exceptions here is the best way forward 👍

@vanessa
Copy link
Contributor

vanessa commented Apr 30, 2024

Why would this return 418 I'm a Teapot? 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants