Closed chiboreache closed 5 years ago
Confirmed bug with version .23.4 - it works in console but not in arepl.
I'll have to look into this.
I think It's a bug with the jsonpickle library I use but I'm having difficulty replicating it with a minimal example. I will look more into this later when I have better internet
So now for some reason on the first run of the code you provided it works fine, but on the second run it gets a different error:
Traceback (most recent call last):
line 7, in <module>
File "C:\Users\anon\AppData\Roaming\Python\Python36\site-packages\pandas\core\frame.py", line 391, in __init__
mgr = init_dict(data, index, columns, dtype=dtype)
File "C:\Users\anon\AppData\Roaming\Python\Python36\site-packages\pandas\core\internals\construction.py", line 209, in init_dict
columns = data_names = Index(keys)
File "C:\Users\anon\AppData\Roaming\Python\Python36\site-packages\pandas\core\indexes\base.py", line 266, in __new__
from .range import RangeIndex
SystemError: Parent module 'pandas.core.indexes' not loaded, cannot perform relative import
I unload user modules after each arepl run in case the user has changed them (in which case they would need to be reloaded), so I guessed that might the problem here. I added pandas.core.indexes into moduleLogic.py and the error went away ...... to be replaced by the error you originally reported.
So now I'm suspicous of the module unloading logic. I added a print to see what modules got unloaded and omg so many modules no wonder things were breaking.
pandas.util._exceptions
pandas.core.arrays.interval
pandas.core.window
pandas.plotting._misc
pandas.core.computation.eval
pytz.exceptions
dateutil.tz.win
pandas.core.indexes.range
pytz.tzinfo
pandas.plotting._style
pandas.core.missing
pandas.core.dtypes.concat
pandas.core.computation.ops
matplotlib.compat.subprocess
pandas.core.reshape.api
typing.io
pandas.core.computation.scope
pandas.core.computation.common
pandas.core.dtypes.common
pandas._libs.lib
pandas.compat.chainmap
matplotlib.dates
pandas.core.accessor
pandas.core.reshape.tile
pandas.core.generic
pandas.core.reshape.merge
pandas.core.arrays.datetimes
pandas.api.types
pandas.core.internals.arrays
pandas.io.json.normalize
pandas._libs.tslib
pandas.io.feather_format
pandas.core.frame
matplotlib._path
pandas.io.msgpack._version
dateutil.easter
pandas.core.arrays.numpy_
pandas.tseries.offsets
dateutil.tz
pandas.util._decorators
pandas.compat.numpy
pandas._libs
pandas.util._print_versions
pandas._libs.writers
pandas.core.sparse
pandas.compat
pandas.core.indexes.accessors
pandas.core.computation.engines
matplotlib.ticker
dateutil.rrule
pandas.core.indexes.numeric
pandas._libs.hashtable
pandas.io.date_converters
pandas.core.indexes.datetimelike
pandas.io.parsers
pandas.util
pandas.core.sparse.frame
pandas.api
pandas.io.formats.console
pandas.util._validators
pandas.core.index
pandas._libs.interval
ctypes.wintypes
pandas.io.sas
pandas.io.sas.sasreader
pandas.core.internals.construction
pandas.util._doctools
pandas.core.config
pandas.io.msgpack._unpacker
pandas.core.dtypes
pandas.core.groupby
pandas._libs.tslibs.timestamps
pandas.core.series
six.moves.urllib.request
pandas._libs.tslibs.resolution
pandas._libs.testing
pandas.core.strings
pandas.io.msgpack.exceptions
dateutil.parser
pandas._libs.skiplist
pandas.core.api
pandas.core.dtypes.missing
pandas.io.formats
pandas.plotting._compat
pandas.io.excel
pandas.core.dtypes.generic
pandas.arrays
pandas._libs.reduction
pandas.io.json
pandas.core.dtypes.api
pandas._libs.sparse
six.moves.urllib
pandas._libs.tslibs.parsing
pandas.core.reshape.concat
pandas.core.indexing
pandas.util._tester
pandas.core.internals
pandas.io.formats.terminal
pandas.plotting._core
pandas.io.api
pandas._libs.tslibs.offsets
pandas.core.indexes.datetimes
pandas._libs.tslibs.nattype
pandas.core.dtypes.dtypes
pandas._libs.internals
pandas.io.msgpack._packer
pandas.core.sorting
pandas._libs.tslibs.timezones
pandas._libs.join
pandas.io.pytables
pandas.io.html
pandas.core.reshape.util
pandas.io.clipboards
pandas.plotting._tools
pandas.core.computation.pytables
pandas._libs.indexing
pandas.core.dtypes.inference
pandas._version
pandas.core.computation.align
dateutil.tz.tz
six.moves
pandas.io.stata
pandas.io.parquet
matplotlib.cbook
pandas.core.internals.blocks
pandas.core.groupby.grouper
pandas.core.computation.api
pandas.core.tools
matplotlib._version
pandas.core.arrays.period
pandas.io.formats.printing
pandas.core.tools.timedeltas
pandas._libs.tslibs.np_datetime
dateutil.tz._common
pandas.plotting._converter
pandas.compat.numpy.function
_cython_0_29_3
pandas.core.reshape.pivot
pandas._libs.algos
matplotlib._color_data
pandas._libs.properties
pandas._libs.tslibs.strptime
pandas.core
matplotlib.path
pandas.core.util.hashing
pandas.io.json.table_schema
pandas.io.common
pandas.io.packers
pandas.core.tools.datetimes
pandas.tseries
pandas.core.arrays._ranges
matplotlib.rcsetup
pandas.core.arrays.categorical
typing.re
pandas.io.sql
pandas.errors
pandas.core.arrays.integer
pandas.core.reshape.melt
pandas.core.indexes.timedeltas
matplotlib.transforms
pandas.io.gbq
pandas._libs.hashing
pandas.core.arrays.base
pandas.core.ops
pandas.core.arrays.array_
pandas.core.arrays.datetimelike
pandas.core.indexes.multi
pandas.core.computation.expr
pandas.core.groupby.ops
pandas.compat.pickle_compat
pandas._libs.tslibs.period
pandas._libs.json
pandas.core.tools.numeric
pandas._libs.tslibs.frequencies
matplotlib.fontconfig_pattern
pandas._libs.tslibs.fields
pandas.core.groupby.groupby
pandas.core.groupby.generic
pandas._libs.tslibs
pandas._libs.reshape
pandas.core.sparse.api
pandas.tseries.api
pandas.core.arrays.timedeltas
pandas.tseries.frequencies
pandas.io
pandas.io.pickle
pandas.core.nanops
pandas.core.internals.concat
matplotlib.units
pandas.core.reshape.reshape
pandas._libs.ops
pandas.core.config_init
pandas.io.formats.format
pandas.util._move
pandas.core.arrays.sparse
pandas._libs.window
pandas.core.groupby.base
pandas.core.computation
pandas.core.indexes.interval
pandas.core.util
pandas.core.indexes.base
pandas.core.base
pythonEvaluator
pandas._libs.index
pandas.util.testing
dateutil._common
pandas.core.dtypes.base
pandas.core.panel
pandas.core.internals.managers
dateutil.relativedelta
pandas._libs.tslibs.ccalendar
pandas._libs.parsers
pandas.plotting
pandas.core.sparse.series
pandas._libs.missing
matplotlib.compat
pandas.core.indexes.period
matplotlib.colors
pandas.io.json.json
pandas.core.common
pandas._libs.tslibs.conversion
pandas.io.msgpack
pytz.lazy
pandas._libs.tslibs.timedeltas
pandas._libs.groupby
pandas.core.arrays
pandas.core.indexes.api
pandas.core.sparse.scipy_sparse
pandas.core.algorithms
pandas.core.reshape
pandas.core.dtypes.cast
pandas.core.indexes.frozen
pandas.api.extensions
pandas.core.indexes.category
dateutil
pytz.tzfile
pandas.testing
I'll have to revise my module reloading logic to fix this issue. Thanks for reporting it again!
just WOW
keep rocking mahn!
Logic is fixed in backend. Expect a release w/ bugfix soon.
I just released a new version of arepl. @chiboreache can you try your code out and see if it works please? If you have any any bug reports or suggestions on how I can improve pandas support feel free to create a issue.
@Almenon — Nice work mate! Thanks =)
Unfortunately, I have some small error popuping in my output, heh I'll create a new ticket ;)
Oh, and yeah, my pandas code work just right ¡)
Hi! It just poping up after a few seconds in interactive REPL
Code Sample
What I expected
Empty DataFrame Columns: [] Index: []
But what I got
Output of
pd.show_versions()