Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix Python 3 bytes/unicode issue with Entrez.epost

Based on fix from Nicolas Joannin on the mailing list,
http://lists.open-bio.org/pipermail/biopython/2013-March/008419.html
  • Loading branch information...
commit f0f4536119947e7d4df838adf6283e545e0dee54 1 parent 7149052
Peter Cock peterjc authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 Bio/Entrez/__init__.py
4 Bio/Entrez/__init__.py
View
@@ -74,7 +74,7 @@
import warnings
import os.path
-from Bio._py3k import _binary_to_string_handle
+from Bio._py3k import _binary_to_string_handle, _as_bytes
email = None
tool = "biopython"
@@ -451,7 +451,7 @@ def _open(cgi, params={}, post=False):
try:
if post:
#HTTP POST
- handle = urllib2.urlopen(cgi, data=options)
+ handle = urllib2.urlopen(cgi, data=_as_bytes(options))
else:
#HTTP GET
cgi += "?" + options
Please sign in to comment.
Something went wrong with that request. Please try again.