{"action":"created","issue":{"url":"https://api.github.com/repos/biopython/biopython/issues/996","repository_url":"https://api.github.com/repos/biopython/biopython","labels_url":"https://api.github.com/repos/biopython/biopython/issues/996/labels{/name}","comments_url":"https://api.github.com/repos/biopython/biopython/issues/996/comments","events_url":"https://api.github.com/repos/biopython/biopython/issues/996/events","html_url":"https://github.com/biopython/biopython/issues/996","id":188979698,"number":996,"title":"10.5.2  Searching Swiss-Prot sprot_search_ful example does not run.","user":{"login":"vincentdavis","id":232564,"avatar_url":"https://avatars.githubusercontent.com/u/232564?v=3","gravatar_id":"","url":"https://api.github.com/users/vincentdavis","html_url":"https://github.com/vincentdavis","followers_url":"https://api.github.com/users/vincentdavis/followers","following_url":"https://api.github.com/users/vincentdavis/following{/other_user}","gists_url":"https://api.github.com/users/vincentdavis/gists{/gist_id}","starred_url":"https://api.github.com/users/vincentdavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincentdavis/subscriptions","organizations_url":"https://api.github.com/users/vincentdavis/orgs","repos_url":"https://api.github.com/users/vincentdavis/repos","events_url":"https://api.github.com/users/vincentdavis/events{/privacy}","received_events_url":"https://api.github.com/users/vincentdavis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-13T16:37:37Z","updated_at":"2016-11-13T17:24:50Z","closed_at":null,"body":"I was testing this in reference to an [old redmine issue](https://redmine.open-bio.org/issues/3301)\r\nreporting the URL for sprot_search_ful no longer being valid.\r\n\r\n```python\r\nfrom Bio import ExPASy\r\nimport re\r\n\r\n#handle = ExPASy.sprot_search_de(\"Orchid Chalcone Synthase\")\r\n# or:\r\nhandle = ExPASy.sprot_search_ful(\"Orchid and {Chalcone Synthase}\")\r\nhtml_results = handle.read()\r\nif \"Number of sequences found\" in html_results:\r\n    ids = re.findall(r'HREF=\"/uniprot/(\\w+)\"', html_results)\r\nelse:\r\n    ids = re.findall(r'href=\"/cgi-bin/niceprot\\.pl\\?(\\w+)\"', html_results)\r\n```\r\n\r\n```python\r\n---------------------------------------------------------------------------\r\nTypeError                                 Traceback (most recent call last)\r\n<ipython-input-32-ae78a961bd3d> in <module>()\r\n      6 handle = ExPASy.sprot_search_ful(\"Orchid and {Chalcone Synthase}\")\r\n      7 html_results = handle.read()\r\n----> 8 if \"Number of sequences found\" in html_results:\r\n      9     ids = re.findall(r'HREF=\"/uniprot/(\\w+)\"', html_results)\r\n     10 else:\r\n\r\nTypeError: a bytes-like object is required, not 'str'\r\n```"},"comment":{"url":"https://api.github.com/repos/biopython/biopython/issues/comments/260199453","html_url":"https://github.com/biopython/biopython/issues/996#issuecomment-260199453","issue_url":"https://api.github.com/repos/biopython/biopython/issues/996","id":260199453,"user":{"login":"peterjc","id":63959,"avatar_url":"https://avatars.githubusercontent.com/u/63959?v=3","gravatar_id":"","url":"https://api.github.com/users/peterjc","html_url":"https://github.com/peterjc","followers_url":"https://api.github.com/users/peterjc/followers","following_url":"https://api.github.com/users/peterjc/following{/other_user}","gists_url":"https://api.github.com/users/peterjc/gists{/gist_id}","starred_url":"https://api.github.com/users/peterjc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterjc/subscriptions","organizations_url":"https://api.github.com/users/peterjc/orgs","repos_url":"https://api.github.com/users/peterjc/repos","events_url":"https://api.github.com/users/peterjc/events{/privacy}","received_events_url":"https://api.github.com/users/peterjc/received_events","type":"User","site_admin":false},"created_at":"2016-11-13T17:24:50Z","updated_at":"2016-11-13T17:24:50Z","body":"Its Python 2 code, for Python 3 you need to convert the bytes-based network handle into a text-based one. See #754.\r\n\r\nAlso looks like a partial duplicate of #253?"}}
{"actor":{"display_login":"peterjc"}}