You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: the expected output is printed when a local file is read.
Output of pd.show_versions()
Python 3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 14:38:56)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
import pandas as pd
pd.show_versions()
INSTALLED VERSIONS
commit : None
python : 3.7.3.final.0
python-bits : 64
OS : Darwin
OS-release : 19.4.0
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
Traceback (most recent call last):
File "after.py", line 19, in <module>
"gs://{}/sas_sample/Nchs/Nhanes/2017-2018/DEMO_J.XPT".format(bucket_name)
File "/Users/swast/miniconda3/envs/pandas-dev/lib/python3.7/site-packages/pandas/io/sas/sasreader.py", line 70, in read_sas
filepath_or_buffer, index=index, encoding=encoding, chunksize=chunksize
File "/Users/swast/miniconda3/envs/pandas-dev/lib/python3.7/site-packages/pandas/io/sas/sas_xport.py", line 280, in __init__
contents = contents.encode(self._encoding)
AttributeError: 'bytes' object has no attribute 'encode'
Code Sample, a copy-pastable example if possible
From https://stackoverflow.com/q/60848250/101923
Problem description
This throws the following exception:
Expected Output
Note: the expected output is printed when a local file is read.
Output of
pd.show_versions()
Python 3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 14:38:56)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
INSTALLED VERSIONS
commit : None
python : 3.7.3.final.0
python-bits : 64
OS : Darwin
OS-release : 19.4.0
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 0.25.1
numpy : 1.18.1
pytz : 2019.2
dateutil : 2.8.1
pip : 20.0.2
setuptools : 46.0.0.post20200311
Cython : None
pytest : 5.0.1
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.5.0
html5lib : 1.0.1
pymysql : None
psycopg2 : None
jinja2 : 2.11.1
IPython : 7.7.0
pandas_datareader: None
bs4 : 4.8.0
bottleneck : None
fastparquet : None
gcsfs : 0.6.0
lxml.etree : 4.5.0
matplotlib : 3.1.1
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : 0.11.0
pyarrow : 0.15.1
pytables : None
s3fs : None
scipy : 1.4.1
sqlalchemy : None
tables : None
xarray : 0.12.3
xlrd : None
xlwt : None
xlsxwriter : None
The text was updated successfully, but these errors were encountered: