{"action":"created","issue":{"url":"https://api.github.com/repos/incuna/django-wkhtmltopdf/issues/71","labels_url":"https://api.github.com/repos/incuna/django-wkhtmltopdf/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/incuna/django-wkhtmltopdf/issues/71/comments","events_url":"https://api.github.com/repos/incuna/django-wkhtmltopdf/issues/71/events","html_url":"https://github.com/incuna/django-wkhtmltopdf/issues/71","id":52162742,"number":71,"title":"Problem with filename","user":{"login":"fedeverdini","id":4589078,"avatar_url":"https://avatars.githubusercontent.com/u/4589078?v=3","gravatar_id":"","url":"https://api.github.com/users/fedeverdini","html_url":"https://github.com/fedeverdini","followers_url":"https://api.github.com/users/fedeverdini/followers","following_url":"https://api.github.com/users/fedeverdini/following{/other_user}","gists_url":"https://api.github.com/users/fedeverdini/gists{/gist_id}","starred_url":"https://api.github.com/users/fedeverdini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedeverdini/subscriptions","organizations_url":"https://api.github.com/users/fedeverdini/orgs","repos_url":"https://api.github.com/users/fedeverdini/repos","events_url":"https://api.github.com/users/fedeverdini/events{/privacy}","received_events_url":"https://api.github.com/users/fedeverdini/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-12-16T20:28:26Z","updated_at":"2015-10-20T22:06:12Z","closed_at":null,"body":"My view.py\r\n\r\nclass MyPDF(PDFTemplateView):\r\n    template_name = \"core/index-direct.html\"\r\n    filename = 'my_pdf.pdf'\r\n    cmd_options = {\r\n        'margin-top': 3\r\n    }\r\n\r\n   def get_context_data(self, **kwargs):\r\n        ... some context\r\n        return context\r\n\r\nI get this error:\r\n\r\n\"Can't convert 'bytes' object to str implicitly\" in \\site-packages\\wkhtmltopdf\\utils.py in http_quote, line 129\r\n\r\nI was trying to find a way to solve this, and it works form me:\r\n\r\n112   filename = filename.replace(';', '').replace('\"', '').encode()\r\n113   return http_quote(filename)\r\n\r\nIs it the correct way to do this??? What's wrong in my code??"},"comment":{"url":"https://api.github.com/repos/incuna/django-wkhtmltopdf/issues/comments/149716460","html_url":"https://github.com/incuna/django-wkhtmltopdf/issues/71#issuecomment-149716460","issue_url":"https://api.github.com/repos/incuna/django-wkhtmltopdf/issues/71","id":149716460,"user":{"login":"timb07","id":2024221,"avatar_url":"https://avatars.githubusercontent.com/u/2024221?v=3","gravatar_id":"","url":"https://api.github.com/users/timb07","html_url":"https://github.com/timb07","followers_url":"https://api.github.com/users/timb07/followers","following_url":"https://api.github.com/users/timb07/following{/other_user}","gists_url":"https://api.github.com/users/timb07/gists{/gist_id}","starred_url":"https://api.github.com/users/timb07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timb07/subscriptions","organizations_url":"https://api.github.com/users/timb07/orgs","repos_url":"https://api.github.com/users/timb07/repos","events_url":"https://api.github.com/users/timb07/events{/privacy}","received_events_url":"https://api.github.com/users/timb07/received_events","type":"User","site_admin":false},"created_at":"2015-10-20T22:06:12Z","updated_at":"2015-10-20T22:06:12Z","body":"This still seems to be an issue; the commit linked above doesn't seem to have been released.\r\n\r\nThis is the error I'm getting with Python 3.4:\r\n\r\n```  File \"/.virtualenvs/django/lib/python3.4/site-packages/wkhtmltopdf/utils.py\", line 135, in http_quote\r\n    string = string.replace(b'\\\\', b'\\\\\\\\').replace(b'\"', b'\\\\\"')\r\nTypeError: Can't convert 'bytes' object to str implicitly```"}}