I'm trying to setup rembg github repository in my system but I'm facing issues
When running the statement rembg i input.png output.png I face the following error
PS C:\Users\Asad Kareem\Desktop\Happy Frog> rembg i input.png output.png
Traceback (most recent call last):
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Asad Kareem\AppData\Local\Programs\Python\Python39-32\Scripts\rembg.exe\__main__.py", line 4, in <module>
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\rembg\__init__.py", line 11, in <module>
from .bg import remove
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\rembg\bg.py", line 8, in <module>
from pymatting.alpha.estimate_alpha_cf import estimate_alpha_cf
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\pymatting\__init__.py", line 2, in <module>
from pymatting.util import *
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\pymatting\util\__init__.py", line 2, in <module>
from pymatting.util.kdtree import KDTree, knn
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\pymatting\util\kdtree.py", line 138, in <module>
def _find_knn(
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\decorators.py", line 219, in wrapper
disp.compile(sig)
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\dispatcher.py", line 965, in compile
cres = self._compiler.compile(args, return_type)
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\dispatcher.py", line 125, in compile
status, retval = self._compile_cached(args, return_type)
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\dispatcher.py", line 139, in _compile_cached
retval = self._compile_core(args, return_type)
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\dispatcher.py", line 152, in _compile_core
cres = compiler.compile_extra(self.targetdescr.typing_context,
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\compiler.py", line 693, in compile_extra
return pipeline.compile_extra(func)
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\compiler.py", line 429, in compile_extra
return self._compile_bytecode()
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\compiler.py", line 497, in _compile_bytecode
return self._compile_core()
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\compiler.py", line 476, in _compile_core
raise e
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\compiler.py", line 463, in _compile_core
pm.run(self.state)
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\compiler_machinery.py", line 353, in run
raise patched_exception
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\compiler_machinery.py", line 341, in run
self._runPass(idx, pass_inst, state)
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\compiler_lock.py", line 35, in _acquire_compile_lock
return func(*args, **kwargs)
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\compiler_machinery.py", line 296, in _runPass
mutated |= check(pss.run_pass, internal_state)
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\compiler_machinery.py", line 269, in check
mangled = func(compiler_state)
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\typed_passes.py", line 394, in run_pass
lower.lower()
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\lowering.py", line 196, in lower
self.lower_normal_function(self.fndesc)
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\lowering.py", line 250, in lower_normal_function
entry_block_tail = self.lower_function_body()
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\lowering.py", line 279, in lower_function_body
self.lower_block(block)
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\lowering.py", line 293, in lower_block
self.lower_inst(inst)
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\lowering.py", line 565, in lower_inst
func(self, inst)
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\parfors\parfor_lowering.py", line 64, in _lower_parfor_parallel
ensure_parallel_support()
File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\parfors\parfor.py", line 4701, in ensure_parallel_support
raise errors.UnsupportedParforsError(msg)
numba.core.errors.UnsupportedParforsError: Failed in nopython mode pipeline (step: native lowering)
Can anybody help me with the issue?
Related
I am trying to install Airflow 2.0.1 with ansible on CentOS8 machine. Python version 3.8.1. I made pip 20.2.4 as suggested in Airflow docs.
I am using postgresql and airflow db check is successful. But the db init task gives the following error. I tried airflow db init manually but the result was the same:
ERROR - Failed to add operation for GET /api/v1/connections
Traceback (most recent call last):
File "/opt/airflow/lib/python3.8/site-packages/connexion/apis/abstract.py", line 209, in add_paths
self.add_operation(path, method)
File "/opt/airflow/lib/python3.8/site-packages/connexion/apis/abstract.py", line 162, in add_operation
operation = make_operation(
File "/opt/airflow/lib/python3.8/site-packages/connexion/operations/__init__.py", line 8, in make_operation
return spec.operation_cls.from_spec(spec, *args, **kwargs)
File "/opt/airflow/lib/python3.8/site-packages/connexion/operations/openapi.py", line 128, in from_spec
return cls(
File "/opt/airflow/lib/python3.8/site-packages/connexion/operations/openapi.py", line 75, in __init__
super(OpenAPIOperation, self).__init__(
File "/opt/airflow/lib/python3.8/site-packages/connexion/operations/abstract.py", line 96, in __init__
self._resolution = resolver.resolve(self)
File "/opt/airflow/lib/python3.8/site-packages/connexion/resolver.py", line 40, in resolve
return Resolution(self.resolve_function_from_operation_id(operation_id), operation_id)
File "/opt/airflow/lib/python3.8/site-packages/connexion/resolver.py", line 66, in resolve_function_from_operation_id
raise ResolverError(str(e), sys.exc_info())
connexion.exceptions.ResolverError: <ResolverError: columns>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/airflow/bin/airflow", line 8, in <module>
sys.exit(main())
File "/opt/airflow/lib/python3.8/site-packages/airflow/__main__.py", line 40, in main
args.func(args)
File "/opt/airflow/lib/python3.8/site-packages/airflow/cli/cli_parser.py", line 48, in command
return func(*args, **kwargs)
File "/opt/airflow/lib/python3.8/site-packages/airflow/cli/commands/db_command.py", line 31, in initdb
db.initdb()
File "/opt/airflow/lib/python3.8/site-packages/airflow/utils/db.py", line 549, in initdb
upgradedb()
File "/opt/airflow/lib/python3.8/site-packages/airflow/utils/db.py", line 684, in upgradedb
command.upgrade(config, 'heads')
File "/opt/airflow/lib/python3.8/site-packages/alembic/command.py", line 294, in upgrade
script.run_env()
File "/opt/airflow/lib/python3.8/site-packages/alembic/script/base.py", line 490, in run_env
util.load_python_file(self.dir, "env.py")
File "/opt/airflow/lib/python3.8/site-packages/alembic/util/pyfiles.py", line 97, in load_python_file
module = load_module_py(module_id, path)
File "/opt/airflow/lib/python3.8/site-packages/alembic/util/compat.py", line 182, in load_module_py
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/opt/airflow/lib/python3.8/site-packages/airflow/migrations/env.py", line 108, in <module>
run_migrations_online()
File "/opt/airflow/lib/python3.8/site-packages/airflow/migrations/env.py", line 102, in run_migrations_online
context.run_migrations()
File "<string>", line 8, in run_migrations
File "/opt/airflow/lib/python3.8/site-packages/alembic/runtime/environment.py", line 813, in run_migrations
self.get_context().run_migrations(**kw)
File "/opt/airflow/lib/python3.8/site-packages/alembic/runtime/migration.py", line 561, in run_migrations
step.migration_fn(**kw)
File "/opt/airflow/lib/python3.8/site-packages/airflow/migrations/versions/2c6edca13270_resource_based_permissions.py", line 314, in upgrade
remap_permissions()
File "/opt/airflow/lib/python3.8/site-packages/airflow/migrations/versions/2c6edca13270_resource_based_permissions.py", line 289, in remap_permissions
appbuilder = create_app(config={'FAB_UPDATE_PERMS': False}).appbuilder
File "/opt/airflow/lib/python3.8/site-packages/airflow/www/app.py", line 120, in create_app
init_api_connexion(flask_app)
File "/opt/airflow/lib/python3.8/site-packages/airflow/www/extensions/init_views.py", line 171, in init_api_connexion
api_bp = connexion_app.add_api(
File "/opt/airflow/lib/python3.8/site-packages/connexion/apps/flask_app.py", line 57, in add_api
api = super(FlaskApp, self).add_api(specification, **kwargs)
File "/opt/airflow/lib/python3.8/site-packages/connexion/apps/abstract.py", line 144, in add_api
api = self.api_cls(specification,
File "/opt/airflow/lib/python3.8/site-packages/connexion/apis/abstract.py", line 111, in __init__
self.add_paths()
File "/opt/airflow/lib/python3.8/site-packages/connexion/apis/abstract.py", line 216, in add_paths
self._handle_add_operation_error(path, method, err.exc_info)
File "/opt/airflow/lib/python3.8/site-packages/connexion/apis/abstract.py", line 231, in _handle_add_operation_error
raise value.with_traceback(traceback)
File "/opt/airflow/lib/python3.8/site-packages/connexion/resolver.py", line 61, in resolve_function_from_operation_id
return self.function_resolver(operation_id)
File "/opt/airflow/lib/python3.8/site-packages/connexion/utils.py", line 111, in get_function_from_name
module = importlib.import_module(module_name)
File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/opt/airflow/lib/python3.8/site-packages/airflow/api_connexion/endpoints/connection_endpoint.py", line 26, in <module>
from airflow.api_connexion.schemas.connection_schema import (
File "/opt/airflow/lib/python3.8/site-packages/airflow/api_connexion/schemas/connection_schema.py", line 42, in <module>
class ConnectionSchema(ConnectionCollectionItemSchema): # pylint: disable=too-many-ancestors
File "/opt/airflow/lib/python3.8/site-packages/marshmallow/schema.py", line 121, in __new__
klass._declared_fields = mcs.get_declared_fields(
File "/opt/airflow/lib/python3.8/site-packages/marshmallow_sqlalchemy/schema/sqlalchemy_schema.py", line 94, in get_declared_fields
fields.update(mcs.get_auto_fields(fields, converter, opts, dict_cls))
File "/opt/airflow/lib/python3.8/site-packages/marshmallow_sqlalchemy/schema/sqlalchemy_schema.py", line 104, in get_auto_fields
{
File "/opt/airflow/lib/python3.8/site-packages/marshmallow_sqlalchemy/schema/sqlalchemy_schema.py", line 105, in <dictcomp>
field_name: field.create_field(
File "/opt/airflow/lib/python3.8/site-packages/marshmallow_sqlalchemy/schema/sqlalchemy_schema.py", line 28, in create_field
return converter.field_for(model, column_name, **self.field_kwargs)
File "/opt/airflow/lib/python3.8/site-packages/marshmallow_sqlalchemy/convert.py", line 171, in field_for
return self.property2field(prop, **kwargs)
File "/opt/airflow/lib/python3.8/site-packages/marshmallow_sqlalchemy/convert.py", line 146, in property2field
field_class = field_class or self._get_field_class_for_property(prop)
File "/opt/airflow/lib/python3.8/site-packages/marshmallow_sqlalchemy/convert.py", line 210, in _get_field_class_for_property
column = prop.columns[0]
File "/opt/airflow/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 1220, in __getattr__
return self._fallback_getattr(key)
File "/opt/airflow/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 1194, in _fallback_getattr
raise AttributeError(key)
AttributeError: columns
I'm having the same issue, temp fix was to use sqlalchemy < 1.4. Maybe that works for you.
What Worked for me is setting AIRFLOW_HOME and AIRFLOW__CORE__SQL_ALCHEMY_CONN and pip install SQLAlchemy==1.3.24
For me and Airflow 2.3.1 upgrading marshmallow-sqlalchemy helped.
pip install -U marshmallow-sqlalchemy
I set the AIRFLOW_HOME and AIRFLOW__CORE__SQL_ALCHEMY_CONN environment before run airflow db init.
Playbook version
environment:
AIRFLOW_HOME: "{{ airflow_app_home }}"
AIRFLOW__CORE__SQL_ALCHEMY_CONN: "{{ airflow_database_conn }}"
Am trying to execute Jupyter notebook from command line. Am currently using the docker image provided in below link
https://hub.docker.com/r/jupyter/pyspark-notebook
When i try to execute below in command line it fails.
jupyter nbconvert --to notebook --ExecutePreprocessor.kernel_name=PySpark --ExecutePreprocessor.timeout=3600 --execute notebooks/sample-notebook.ipynb
Below is the error message
[NbConvertApp] Converting notebook notebooks/sample-notebook.ipynb to notebook
Traceback (most recent call last):
File "/opt/conda/bin/jupyter-nbconvert", line 11, in <module>
sys.exit(main())
File "/opt/conda/lib/python3.7/site-packages/jupyter_core/application.py", line 270, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/traitlets/config/application.py", line 664, in launch_instance
app.start()
File "/opt/conda/lib/python3.7/site-packages/nbconvert/nbconvertapp.py", line 340, in start
self.convert_notebooks()
File "/opt/conda/lib/python3.7/site-packages/nbconvert/nbconvertapp.py", line 510, in convert_notebooks
self.convert_single_notebook(notebook_filename)
File "/opt/conda/lib/python3.7/site-packages/nbconvert/nbconvertapp.py", line 481, in convert_single_notebook
output, resources = self.export_single_notebook(notebook_filename, resources, input_buffer=input_buffer)
File "/opt/conda/lib/python3.7/site-packages/nbconvert/nbconvertapp.py", line 410, in export_single_notebook
output, resources = self.exporter.from_filename(notebook_filename, resources=resources)
File "/opt/conda/lib/python3.7/site-packages/nbconvert/exporters/exporter.py", line 179, in from_filename
return self.from_file(f, resources=resources, **kw)
File "/opt/conda/lib/python3.7/site-packages/nbconvert/exporters/exporter.py", line 197, in from_file
return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, **kw)
File "/opt/conda/lib/python3.7/site-packages/nbconvert/exporters/notebook.py", line 32, in from_notebook_node
nb_copy, resources = super(NotebookExporter, self).from_notebook_node(nb, resources, **kw)
File "/opt/conda/lib/python3.7/site-packages/nbconvert/exporters/exporter.py", line 139, in from_notebook_node
nb_copy, resources = self._preprocess(nb_copy, resources)
File "/opt/conda/lib/python3.7/site-packages/nbconvert/exporters/exporter.py", line 316, in _preprocess
nbc, resc = preprocessor(nbc, resc)
File "/opt/conda/lib/python3.7/site-packages/nbconvert/preprocessors/base.py", line 47, in __call__
return self.preprocess(nb, resources)
File "/opt/conda/lib/python3.7/site-packages/nbconvert/preprocessors/execute.py", line 403, in preprocess
with self.setup_preprocessor(nb, resources, km=km):
File "/opt/conda/lib/python3.7/contextlib.py", line 112, in __enter__
return next(self.gen)
File "/opt/conda/lib/python3.7/site-packages/nbconvert/preprocessors/execute.py", line 345, in setup_preprocessor
self.km, self.kc = self.start_new_kernel(**kwargs)
File "/opt/conda/lib/python3.7/site-packages/nbconvert/preprocessors/execute.py", line 291, in start_new_kernel
km.start_kernel(extra_arguments=self.extra_arguments, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/jupyter_client/manager.py", line 301, in start_kernel
kernel_cmd, kw = self.pre_start_kernel(**kw)
File "/opt/conda/lib/python3.7/site-packages/jupyter_client/manager.py", line 254, in pre_start_kernel
kernel_cmd = self.format_kernel_cmd(extra_arguments=extra_arguments)
File "/opt/conda/lib/python3.7/site-packages/jupyter_client/manager.py", line 178, in format_kernel_cmd
cmd = self.kernel_spec.argv + extra_arguments
File "/opt/conda/lib/python3.7/site-packages/jupyter_client/manager.py", line 84, in kernel_spec
self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)
File "/opt/conda/lib/python3.7/site-packages/jupyter_client/kernelspec.py", line 235, in get_kernel_spec
raise NoSuchKernel(kernel_name)
jupyter_client.kernelspec.NoSuchKernel: No such kernel named PySpark
When I run unittests with django-simple-history==1.6.0, it runs fine but with
django-simple-history==1.9.0 it breaks the unittests.
Any ideas how to fix this?
Creating test database for alias 'default'...
Traceback (most recent call last):
File "manage.py", line 12, in <module>
execute_from_command_line(sys.argv)
File "/home/me/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/home/me/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/me/venv/lib/python2.7/site-packages/django/core/management/commands/test.py", line 30, in run_from_argv
super(Command, self).run_from_argv(argv)
File "/home/me/venv/lib/python2.7/site-packages/django/core/management/base.py", line 390, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/me/venv/lib/python2.7/site-packages/django/core/management/commands/test.py", line 74, in execute
super(Command, self).execute(*args, **options)
File "/home/me/venv/lib/python2.7/site-packages/django/core/management/base.py", line 441, in execute
output = self.handle(*args, **options)
File "/home/me/venv/lib/python2.7/site-packages/django/core/management/commands/test.py", line 90, in handle
failures = test_runner.run_tests(test_labels)
File "/home/me/venv/lib/python2.7/site-packages/django/test/runner.py", line 210, in run_tests
old_config = self.setup_databases()
File "/home/me/venv/lib/python2.7/site-packages/django/test/runner.py", line 166, in setup_databases
**kwargs
File "/home/me/venv/lib/python2.7/site-packages/django/test/runner.py", line 370, in setup_databases
serialize=connection.settings_dict.get("TEST", {}).get("SERIALIZE", True),
File "/home/me/venv/lib/python2.7/site-packages/django/db/backends/base/creation.py", line 376, in create_test_db
self.connection._test_serialized_contents = self.serialize_db_to_string()
File "/home/me/venv/lib/python2.7/site-packages/django/db/backends/base/creation.py", line 413, in serialize_db_to_string
serializers.serialize("json", get_objects(), indent=None, stream=out)
File "/home/me/venv/lib/python2.7/site-packages/django/core/serializers/__init__.py", line 129, in serialize
s.serialize(queryset, **options)
File "/home/me/venv/lib/python2.7/site-packages/django/core/serializers/base.py", line 52, in serialize
for obj in queryset:
File "/home/me/venv/lib/python2.7/site-packages/django/db/backends/base/creation.py", line 409, in get_objects
for obj in queryset.iterator():
File "/home/me/venv/lib/python2.7/site-packages/django/db/models/query.py", line 238, in iterator
results = compiler.execute_sql()
File "/home/me/venv/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 829, in execute_sql
cursor.execute(sql, params)
File "/home/me/venv/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/home/me/venv/lib/python2.7/site-packages/django/db/utils.py", line 97, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/home/me/venv/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/home/me/venv/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 318, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such column: myapp_historicalbook.history_change_reason
I got it. I had to remove my migration folder in order to be able to run the unit tests.
PATH looks like this, what am I doing wrong? Pywin32 and Pandoc are already installed using Windows MSI:
C:\Users\AliDesktop\Anaconda;C:\Users\AliDesktop\Anaconda\Scripts;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\Program Files (x86)\Graphviz2.38\bin\;C:\Users\AliDesktop\AppData\Local\Pandoc\
I get this on trying to run a command I usually run:
ipython nbconvert --to latex --post PDF .ipynb
C:\Users\AliDesktop\Desktop\Magic Briefcase\School\1\1- Intro to Data Science\le
cture\Summaries\IPython Notebooks>ipython nbconvert --to latex --post PDF .ipynb
Below is my error traceback:
Traceback (most recent call last):
File "C:\Users\AliDesktop\Anaconda\lib\runpy.py", line 162, in _run_module_as_
main
"__main__", fname, loader, pkg_name)
File "C:\Users\AliDesktop\Anaconda\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Users\AliDesktop\Anaconda\Scripts\ipython.exe\__main__.py", line 9, i
n <module>
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\__init__.py", lin
e 120, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\config\applicatio
n.py", line 573, in launch_instance
app.initialize(argv)
File "<string>", line 2, in initialize
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\config\applicatio
n.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\terminal\ipapp.py
", line 321, in initialize
super(TerminalIPythonApp, self).initialize(argv)
File "<string>", line 2, in initialize
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\config\applicatio
n.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\core\application.
py", line 369, in initialize
self.parse_command_line(argv)
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\terminal\ipapp.py
", line 316, in parse_command_line
return super(TerminalIPythonApp, self).parse_command_line(argv)
File "<string>", line 2, in parse_command_line
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\config\applicatio
n.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\config\applicatio
n.py", line 471, in parse_command_line
return self.initialize_subcommand(subc, subargv)
File "<string>", line 2, in initialize_subcommand
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\config\applicatio
n.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\config\applicatio
n.py", line 409, in initialize_subcommand
self.subapp.initialize(argv)
File "<string>", line 2, in initialize
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\config\applicatio
n.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\nbconvert\nbconve
rtapp.py", line 211, in initialize
super(NbConvertApp, self).initialize(argv)
File "<string>", line 2, in initialize
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\config\applicatio
n.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\core\application.
py", line 369, in initialize
self.parse_command_line(argv)
File "<string>", line 2, in parse_command_line
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\config\applicatio
n.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\config\applicatio
n.py", line 495, in parse_command_line
self.update_config(config)
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\config\applicatio
n.py", line 394, in update_config
self.config = newconfig
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\utils\traitlets.p
y", line 445, in __set__
obj._notify_trait(self.name, old_value, new_value)
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\utils\traitlets.p
y", line 602, in _notify_trait
c(name, old_value, new_value)
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\config\applicatio
n.py", line 241, in _config_changed
SingletonConfigurable._config_changed(self, name, old, new)
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\config\configurab
le.py", line 159, in _config_changed
self._load_config(new, traits=traits, section_names=section_names)
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\config\configurab
le.py", line 143, in _load_config
setattr(self, name, deepcopy(config_value))
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\utils\traitlets.p
y", line 445, in __set__
obj._notify_trait(self.name, old_value, new_value)
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\utils\traitlets.p
y", line 602, in _notify_trait
c(name, old_value, new_value)
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\nbconvert\nbconve
rtapp.py", line 193, in _postprocessor_class_changed
self.postprocessor_factory = import_item(new)
File "C:\Users\AliDesktop\Anaconda\lib\site-packages\IPython\utils\importstrin
g.py", line 50, in import_item
return __import__(parts[0])
ImportError: No module named PDF
The options --to latex --post PDF have been replaced by --to pdf in IPython >= 3.0. So this should work:
ipython nbconvert --to pdf </path/to/notebook>
For further information see also issue #7973 on github.
my ipython notebook functionality stop working.
If I do
ipython notebook
the console just hangs forever with no debug output.
I have already tried reinstalling ipython but no success.
Also, if I start normal ipython everything seems fine.
Does anybody have a clue how to solve this? I suspect some lock file is still there but how can I find out what is exactly going wrong?
also if I force interrupt I get the following stack trace
^C^CTraceback (most recent call last):
File "/home/lfiaschi/anaconda/bin/ipython", line 9, in <module>
load_entry_point('ipython==1.2.1', 'console_scripts', 'ipython')()
File "/home/lfiaschi/anaconda/lib/python2.7/site-packages/IPython/__init__.py", line 118, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "/home/lfiaschi/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 544, in launch_instance
app.initialize(argv)
File "<string>", line 2, in initialize
File "/home/lfiaschi/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 89, in catch_config_error
return method(app, *args, **kwargs)
File "/home/lfiaschi/anaconda/lib/python2.7/site-packages/IPython/terminal/ipapp.py", line 312, in initialize
super(TerminalIPythonApp, self).initialize(argv)
File "<string>", line 2, in initialize
File "/home/lfiaschi/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 89, in catch_config_error
return method(app, *args, **kwargs)
File "/home/lfiaschi/anaconda/lib/python2.7/site-packages/IPython/core/application.py", line 373, in initialize
self.parse_command_line(argv)
File "/home/lfiaschi/anaconda/lib/python2.7/site-packages/IPython/terminal/ipapp.py", line 307, in parse_command_line
return super(TerminalIPythonApp, self).parse_command_line(argv)
File "<string>", line 2, in parse_command_line
File "/home/lfiaschi/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 89, in catch_config_error
return method(app, *args, **kwargs)
File "/home/lfiaschi/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 474, in parse_command_line
return self.initialize_subcommand(subc, subargv)
File "<string>", line 2, in initialize_subcommand
File "/home/lfiaschi/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 89, in catch_config_error
return method(app, *args, **kwargs)
File "/home/lfiaschi/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 405, in initialize_subcommand
subapp = import_item(subapp)
File "/home/lfiaschi/anaconda/lib/python2.7/site-packages/IPython/utils/importstring.py", line 42, in import_item
module = __import__(package, fromlist=[obj])
File "/home/lfiaschi/anaconda/lib/python2.7/site-packages/IPython/html/notebookapp.py", line 64, in <module>
from .services.kernels.kernelmanager import MappingKernelManager
File "/home/lfiaschi/anaconda/lib/python2.7/site-packages/IPython/html/services/kernels/kernelmanager.py", line 21, in <module>
from IPython.kernel.multikernelmanager import MultiKernelManager
File "/home/lfiaschi/anaconda/lib/python2.7/site-packages/IPython/kernel/__init__.py", line 6, in <module>
from .connect import *
File "/home/lfiaschi/anaconda/lib/python2.7/site-packages/IPython/kernel/connect.py", line 39, in <module>
from IPython.utils.localinterfaces import LOCALHOST
File "/home/lfiaschi/anaconda/lib/python2.7/site-packages/IPython/utils/localinterfaces.py", line 43, in <module>
PUBLIC_IPS = socket.gethostbyname_ex(socket.gethostname() + '.local')[2]
KeyboardInterrupt
I had the same problem in Linux/Ubuntu. This also hanged spyder.
Workaround for me:
(1) Look at host name of computer
cat /etc/hostname
which gives e.g. my-laptop
(2) Ensure that /etc/hosts contains the following entry
127.0.0.1 my-laptop my-laptop.local
because ipython looks for a 'local' extension too.
And fire up again ipython notebook or spyder. This worked for me for spyder, when it was hanging at:
PUBLIC_IPS = socket.gethostbyname_ex(socket.gethostname() + '.local')[2]