Title: Using translate_document with SRT format leads to Internal Server Error or broken HTML · Issue #146 · DeepL/deepl-python · GitHub
Open Graph Title: Using translate_document with SRT format leads to Internal Server Error or broken HTML · Issue #146 · DeepL/deepl-python
X Title: Using translate_document with SRT format leads to Internal Server Error or broken HTML · Issue #146 · DeepL/deepl-python
Description: When I send SRT document for translation with translate_document method and I have encountered two problems: If SRT is missing a paired html tag, for example , then Internal server error is returned. ** I would expect a more understan...
Open Graph Description: When I send SRT document for translation with translate_document method and I have encountered two problems: If SRT is missing a paired html tag, for example , then Internal server error is retu...
X Description: When I send SRT document for translation with translate_document method and I have encountered two problems: If SRT is missing a paired html tag, for example <i>, then Internal server error i...
Opengraph URL: https://github.com/DeepL/deepl-python/issues/146
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Using translate_document with SRT format leads to Internal Server Error or broken HTML","articleBody":"When I send SRT document for translation with `translate_document` method and I have encountered two problems:\n\n1) If SRT is missing a paired html tag, for example `\u003ci\u003e`, then **Internal server error** is returned. ** I would expect a more understandable error message.** It takes a long time to figure out what the error is. Example:\n```\n504\n10:19:30,427 --\u003e 10:19:33,028\nIt's a work in progress,\nbut here it goes.\u003c/i\u003e\n```\n\n2) If I send this title for translation:\n```\n504\n10:19:30,427 --\u003e 10:19:33,028\n\u003ci\u003eIt's a work in progress,\nbut here it goes.\u003c/i\u003e\n```\nthen DeepL will add additional tags to the end and beginning of the lines. That would be fine, but unfortunately **it will also remove important line breaks and merge two sentences into one!** Example:\n\n```\n504\n10:19:30,427 --\u003e 10:19:33,028\n\u003ci\u003eIt's a work in progress,\u003c/i\u003e\u003ci\u003ebut here it goes.\u003c/i\u003e\n```\nWe do not want automatic HTML correction. Not under these circumstances!\n\n3) SRT is not usable for documents. I am currently solving this by using the `TXT format ` for SRT (sad).","author":{"url":"https://github.com/Tomac1","@type":"Person","name":"Tomac1"},"datePublished":"2025-09-04T15:02:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/146/deepl-python/issues/146"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:78a364f6-fdba-1301-f8d2-a91a1bdaa65e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E014:2F0FC4:8EDF4E:C21EC2:6A4C8788 |
| html-safe-nonce | 7e8a39d2dc3ba258b471259572162db92acfbe0a606fcfad91c6c86fd04cff68 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDE0OjJGMEZDNDo4RURGNEU6QzIxRUMyOjZBNEM4Nzg4IiwidmlzaXRvcl9pZCI6IjQ5MTUzNTczNjIxMzczNjg0NTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b9221967068fa7c9e31450fb794a155682d7b6710c34bc39381970f79b0a2acd |
| hovercard-subject-tag | issue:3384178360 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/DeepL/deepl-python/146/issue_layout |
| twitter:image | https://opengraph.githubassets.com/beba1cbea6592cf860701b65ac67ec2d20c684f983105cebb0631240dec40ec7/DeepL/deepl-python/issues/146 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/beba1cbea6592cf860701b65ac67ec2d20c684f983105cebb0631240dec40ec7/DeepL/deepl-python/issues/146 |
| og:image:alt | When I send SRT document for translation with translate_document method and I have encountered two problems: If SRT is missing a paired html tag, for example , then Internal server error is retu... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Tomac1 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| go-import | github.com/DeepL/deepl-python git https://github.com/DeepL/deepl-python.git |
| octolytics-dimension-user_id | 83310993 |
| octolytics-dimension-user_login | DeepL |
| octolytics-dimension-repository_id | 387469387 |
| octolytics-dimension-repository_nwo | DeepL/deepl-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 387469387 |
| octolytics-dimension-repository_network_root_nwo | DeepL/deepl-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7a2dede45637df6b92ddcfe2a557e67d4b5854ae |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width