-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
BuildLibrary building on various platformsLibrary building on various platforms
Milestone
Description
If I start python with a -O flag, I get an error as soon as I import pandas
python -O
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas as pd
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/username/.virtualenvs/thm/local/lib/python2.7/site-packages/pandas/__init__.py", line 45, in <module>
from pandas.io.api import *
File "/home/username/.virtualenvs/thm/local/lib/python2.7/site-packages/pandas/io/api.py", line 11, in <module>
from pandas.io.sql import read_sql, read_sql_table, read_sql_query
File "/home/username/.virtualenvs/thm/local/lib/python2.7/site-packages/pandas/io/sql.py", line 1243, in <module>
read_frame.__doc__ += read_sql.__doc__
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'NoneType'
The lines causing the issue are:
# Append wrapped function docstrings
read_frame.__doc__ += read_sql.__doc__
frame_query.__doc__ += read_sql.__doc__
It appears as if python is stripping the docstrings, which then causes issues. Commenting the lines out fixes the problem.
I'm on Ubuntu 14.04.1 LTS, my version info is:
>>> pd.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.6.final.0
python-bits: 64
OS: Linux
OS-release: 3.13.0-29-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.14.1
nose: 1.3.0
Cython: None
numpy: 1.8.0
scipy: 0.9.0
statsmodels: None
IPython: None
sphinx: None
patsy: None
scikits.timeseries: None
dateutil: 2.2
pytz: 2013.9
bottleneck: 0.8.0
tables: None
numexpr: 2.4
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
rpy2: None
sqlalchemy: 0.9.7
pymysql: None
psycopg2: None
Metadata
Metadata
Assignees
Labels
BuildLibrary building on various platformsLibrary building on various platforms