Unable to initialise Spark - pyspark

I'm trying to initialise spark using pyspark in Spyder (IDE) but always get error. (OS - Ubuntu 16.04 LTS)
from pyspark.sql import SparkSession
spark = SparkSession.builder.getOrCreate()
File "<ipython-input-7-86b3963ebca1>", line 3, in <module>
.appName("test_import")\
File "/home/fly/anaconda3/lib/python3.7/site-packages/pyspark/sql/session.py", line 173, in getOrCreate
sc = SparkContext.getOrCreate(sparkConf)
File "/home/fly/anaconda3/lib/python3.7/site-packages/pyspark/context.py", line 349, in getOrCreate
SparkContext(conf=conf or SparkConf())
File "/home/fly/anaconda3/lib/python3.7/site-packages/pyspark/context.py", line 118, in __init__
conf, jsc, profiler_cls)
File "/home/fly/anaconda3/lib/python3.7/site-packages/pyspark/context.py", line 187, in _do_init
self._accumulatorServer = accumulators._start_update_server(auth_token)
File "/home/fly/anaconda3/lib/python3.7/site-packages/pyspark/accumulators.py", line 291, in _start_update_server
server = AccumulatorServer(("localhost", 0), _UpdateRequestHandler, auth_token)
File "/home/fly/anaconda3/lib/python3.7/site-packages/pyspark/accumulators.py", line 274, in __init__
SocketServer.TCPServer.__init__(self, server_address, RequestHandlerClass)
File "/home/fly/anaconda3/lib/python3.7/socketserver.py", line 452, in __init__
self.server_bind()
File "/home/fly/anaconda3/lib/python3.7/socketserver.py", line 466, in server_bind
self.socket.bind(self.server_address)
gaierror: [Errno -2] Name or service not known

This is most likely because you aren't able to connect with the spark-master. Go to your /etc/hosts file and add this line to it.
127.0.0.1 localhost

Related

Error Running Apache Beam with python via Dataflow runner

Description
I am currently implementing a batch job with dataflow using apache beam, this works fine when i use direct runner. Changing this throws the below exception, not sure where the error is comming from.
Code Snippet
enter image description here
Error:
raceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/beam_mysql/connector/client.py", line 179, in enter
self.conn = mysql.connector.connect(**self._config)
File "/usr/local/lib/python3.9/site-packages/mysql/connector/pooling.py", line 286, in connect
return CMySQLConnection(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/mysql/connector/connection_cext.py", line 101, in init
self.connect(**kwargs)
File "/usr/local/lib/python3.9/site-packages/mysql/connector/abstracts.py", line 1095, in connect
self._open_connection()
File "/usr/local/lib/python3.9/site-packages/mysql/connector/connection_cext.py", line 268, in _open_connection
raise get_mysql_exception(
mysql.connector.errors.DatabaseError: 2003 (HY000): Can't connect to MySQL server on '127.0.0.1:41849' (111)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/apache_beam/runners/worker/sdk_worker.py", line 284, in _execute
response = task()
File "/usr/local/lib/python3.9/site-packages/apache_beam/runners/worker/sdk_worker.py", line 357, in
lambda: self.create_worker().do_instruction(request), request)
File "/usr/local/lib/python3.9/site-packages/apache_beam/runners/worker/sdk_worker.py", line 597, in do_instruction
return getattr(self, request_type)(
File "/usr/local/lib/python3.9/site-packages/apache_beam/runners/worker/sdk_worker.py", line 635, in process_bundle
bundle_processor.process_bundle(instruction_id))
File "/usr/local/lib/python3.9/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1003, in process_bundle
input_op_by_transform_id[element.transform_id].process_encoded(
File "/usr/local/lib/python3.9/site-packages/apache_beam/runners/worker/bundle_processor.py", line 227, in process_encoded
self.output(decoded_value)
File "apache_beam/runners/worker/operations.py", line 526, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam/runners/worker/operations.py", line 528, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam/runners/worker/operations.py", line 237, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam/runners/worker/operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam/runners/worker/operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/worker/operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam/runners/common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam/runners/common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam/runners/common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam/runners/worker/operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam/runners/worker/operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/worker/operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam/runners/common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam/runners/common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam/runners/common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam/runners/worker/operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam/runners/worker/operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/worker/operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 1507, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam/runners/common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam/runners/common.py", line 1571, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "/usr/local/lib/python3.9/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1454, in process
for part, size in self.restriction_provider.split_and_size(
File "/usr/local/lib/python3.9/site-packages/apache_beam/transforms/core.py", line 331, in split_and_size
for part in self.split(element, restriction):
File "/usr/local/lib/python3.9/site-packages/apache_beam/io/iobase.py", line 1641, in split
estimated_size = restriction.source().estimate_size()
File "/usr/local/lib/python3.9/site-packages/beam_mysql/connector/source.py", line 49, in estimate_size
return self._splitter.estimate_size()
File "/usr/local/lib/python3.9/site-packages/beam_mysql/connector/splitters.py", line 48, in estimate_size
return self.source.client.rough_counts_estimator(self.source.query)
File "/usr/local/lib/python3.9/site-packages/beam_mysql/connector/client.py", line 104, in rough_counts_estimator
with _MySQLConnection(self._config) as conn:
File "/usr/local/lib/python3.9/site-packages/beam_mysql/connector/client.py", line 182, in enter
raise MySQLClientError(f"Failed to connect mysql, Raise exception: {e}")
beam_mysql.connector.errors.MySQLClientError: Failed to connect mysql, Raise exception: 2003 (HY000): Can't connect to MySQL server on '127.0.0.1:36247' (111) [while running 'ref_AppliedPTransform_Read-From-Mysql-Read-SDFBoundedSourceReader-ParDo-SDFBoundedSourceDoFn-_7/SplitWithSizing-ptransform-38']
You have a connection problem to MySql :
Your traceback indicates :
mysql.connector.errors.DatabaseError: 2003 (HY000): Can't connect to MySQL server on '127.0.0.1:41849'
https://dev.mysql.com/doc/refman/8.0/en/can-not-connect-to-server.html#:~:text=The%20error%20(2003)%20Can',one%20configured%20on%20the%20server.
Check your connection to your MySql server please and also the parameters passed by your Beam job.

Airflow db init ERROR - Failed to add operation for GET /api/v1/connections

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 }}"

Read GCS file into dask dataframe

I want to read a csv file stored in Google Cloud Storage using dask dataframe.
I have insalled gcsfs & dask in the conda env. on Windows
import dask.dataframe as dd
import gcsfs
project_id = 'my-project'
token_file = 'C:\\path\to\credentials.json'
fs = gcsfs.GCSFileSystem(project=project_id)
gcs_bucket_name = 'my_bucket'
df = dd.read_csv('gs://'+gcs_bucket_name+'/my_file.csv',storage_options={'token': token_file, 'project': project_id})
I know I'm not providing the key file correctly as per
https://gcsfs.readthedocs.io/en/latest/ but not sure how to do it. Can anyone please help?
Error I'm getting -
File "<ipython-input-XXXXXXXX>", line 1, in <module>
runfile('C:/path/to/scripts/my_python_script.py', wdir='C:/path/to/scripts')
File "C:\Users\AppData\Local\Continuum\anaconda3\envs\my-rdkit-env\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
execfile(filename, namespace)
File "C:\Users\AppData\Local\Continuum\anaconda3\envs\my-rdkit-env\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/path/to/scripts/my_python_script.py", line 28, in <module>
df = dd.read_csv('gcs://'+gcs_bucket_name+'/my_file.csv',storage_options={'token': token_file, 'project': project_id})
File "C:\Users\AppData\Local\Continuum\anaconda3\envs\my-rdkit-env\lib\site-packages\dask\dataframe\io\csv.py", line 578, in read
**kwargs
File "C:\Users\AppData\Local\Continuum\anaconda3\envs\my-rdkit-env\lib\site-packages\dask\dataframe\io\csv.py", line 444, in read_pandas
head = reader(BytesIO(b_sample), **kwargs)
File "C:\Users\AppData\Local\Continuum\anaconda3\envs\my-rdkit-env\lib\site-packages\pandas\io\parsers.py", line 685, in parser_f
return _read(filepath_or_buffer, kwds)
File "C:\Users\AppData\Local\Continuum\anaconda3\envs\my-rdkit-env\lib\site-packages\pandas\io\parsers.py", line 463, in _read
data = parser.read(nrows)
File "C:\Users\AppData\Local\Continuum\anaconda3\envs\my-rdkit-env\lib\site-packages\pandas\io\parsers.py", line 1154, in read
ret = self._engine.read(nrows)
File "C:\Users\AppData\Local\Continuum\anaconda3\envs\my-rdkit-env\lib\site-packages\pandas\io\parsers.py", line 2059, in read
data = self._reader.read(nrows)
File "pandas/_libs/parsers.pyx", line 881, in pandas._libs.parsers.TextReader.read
File "pandas/_libs/parsers.pyx", line 896, in pandas._libs.parsers.TextReader._read_low_memory
File "pandas/_libs/parsers.pyx", line 950, in pandas._libs.parsers.TextReader._read_rows
File "pandas/_libs/parsers.pyx", line 937, in pandas._libs.parsers.TextReader._tokenize_rows
File "pandas/_libs/parsers.pyx", line 2132, in pandas._libs.parsers.raise_parser_error
ParserError: Error tokenizing data. C error: Expected 4 fields in line 3, saw 134

'JavaPackage' object is not callable pyspark 2.3.0 Anaconda Win10

I am starting with pySpark. I have installed it in anadonda in Win10. I have copied an example and when I execute the code, I am getting this error:
Traceback (most recent call last):
File ".\testingSpark.py", line 7, in <module>
spark = SparkSession.builder.master("local").getOrCreate()
File "D:\Windows\Anaconda3\lib\site-packages\pyspark\sql\session.py", line 173, in getOrCreate
sc = SparkContext.getOrCreate(sparkConf)
File "D:\Windows\Anaconda3\lib\site-packages\pyspark\context.py", line 331, in getOrCreate
SparkContext(conf=conf or SparkConf())
File "D:\Windows\Anaconda3\lib\site-packages\pyspark\context.py", line 118, in __init__
conf, jsc, profiler_cls)
File "D:\Windows\Anaconda3\lib\site-packages\pyspark\context.py", line 188, in _do_init
self._javaAccumulator = self._jvm.PythonAccumulatorV2(host, port)
TypeError: 'JavaPackage' object is not callable
I have read about it, but I can find nothing to fix this error. Please, help me!

Enthought Canopy GUI won't open

I've downloaded Enthought Canopy Express onto my 64-bit Windows 10 laptop, but when I try to open the Canopy program it won't open.
If I try to open it from the desktop shortcut or go into the program files and try to open it directly from the .exe file, all it will do is show the splash page, which then disappears after showing for a few seconds, and then nothing happens. Also after the splash page is gone, task manager shows that Canopy isn't running.
The PyLab application will open and works fine, but I need the actual Enthought Canopy application to work for a class I'm taking.
When I installed it for the very first time, it did open and I was able to use the Enthought Canopy application, but ever since I closed out of it since then it hasn't worked.
When I go into the program files to try and open it from the .exe file, for the file Canopy.exe it will open the splash page and then close, and for Canopy_cli.exe it will open a command prompt looking window, then the splash page, and then both close. The file _python.exe will open and work, and the file _pythonw.exe does nothing.
(These files are at C:\Users\charizard\AppData\Local\Enthought\Canopy\App if that makes any difference.)
I've uninstalled and restarted and reinstalled several times, and I've tried the "Full Reset" suggested in this article. My user name is just "charizard" and my computer name is "messier42", so the problem isn't that it's a non-ASCII user name.
I have also tried the test to see if it's a problem with the PYTHONPATH or PYTHONHOME environment variables like it suggests in this article, but it didn't start Canopy.
This is what I got from the command prompt when I tested that:
Microsoft Windows [Version 10.0.10240]
(c) 2015 Microsoft Corporation. All rights reserved.
C:\Users\charizard>
C:\Users\charizard>set pythonpath=
C:\Users\charizard>set pythonhome=
C:\Users\charizard>set
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\charizard\AppData\Roaming
asl.log=Destination=file
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=MESSIER42
ComSpec=C:\WINDOWS\system32\cmd.exe
FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer
FPS_BROWSER_USER_PROFILE_STRING=Default
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Users\charizard
LOCALAPPDATA=C:\Users\charizard\AppData\Local
LOGONSERVER=\\MicrosoftAccount
NUMBER_OF_PROCESSORS=4
OS=Windows_NT
Path=C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Broadcom\Broadcom 802.11 Network Adapter;;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files\Acer\Remote Files\;C:\Program Files (x86)\Calibre2\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Skype\Phone\;c:\users\charizard\appdata\local\enthought\canopy\user\scripts;C:\Users\charizard\AppData\Roaming\Dashlane\3.5.2.91395\bin\Firefox_Extension\{442718d9-475e-452a-b3e1-fb1ee16b8e9f}\components;C:\Users\charizard\AppData\Local\Enthought\Canopy\User;C:\Users\charizard\AppData\Local\Enthought\Canopy\User\Scripts
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 69 Stepping 1, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=4501
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC=C:\Users\Public
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\Users\CHARIZ~1\AppData\Local\Temp
TMP=C:\Users\CHARIZ~1\AppData\Local\Temp
USERDOMAIN=MESSIER42
USERDOMAIN_ROAMINGPROFILE=MESSIER42
USERNAME=charizard
USERPROFILE=C:\Users\charizard
windir=C:\WINDOWS
[.... later after correcting typo...]
C:\Users\charizard>cd "%localappdata%\enthought\canopy\app"
C:\Users\charizard\AppData\Local\Enthought\Canopy\App>_python.exe canopy-script.pyw
Traceback (most recent call last):
File "canopy-script.pyw", line 776, in <module>
File "canopy-script.pyw", line 336, in bootstrap
File "canopy-script.pyw", line 363, in chainload
File "canopy-script.pyw", line 762, in _chainload
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\Canopy-script.pyw", line 8, in <module>
sys.exit(main())
File "build\bdist.win-amd64\egg\canopy\app\bootstrap.py", line 2421, in main
File "build\bdist.win-amd64\egg\canopy\app\bootstrap.py", line 2357, in send_bug_report
File "build\bdist.win-amd64\egg\canopy\feedback\data_reporter.py", line 25, in <module>
File "build\bdist.win-amd64\egg\canopy\app\application.py", line 22, in <module>
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\Lib\site-packages\envisage\ui\tasks\api.py", line 2, in <module>
from preferences_pane import PreferencesPane
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\Lib\site-packages\envisage\ui\tasks\preferences_pane.py", line 4, in <module>
from traitsui.api import Controller
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\Lib\site-packages\traitsui\api.py", line 41, in <module>
from .editors.api import (BooleanEditor, ButtonEditor,
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\Lib\site-packages\traitsui\editors\__init__.py", line 27, in <module>
from .api import (toolkit, BooleanEditor, ButtonEditor,
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\Lib\site-packages\traitsui\editors\api.py", line 8, in <module>
from .array_editor import ArrayEditor
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\Lib\site-packages\traitsui\editors\array_editor.py", line 27, in <module>
import numpy
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\Lib\site-packages\numpy\__init__.py", line 185, in <module>
from . import add_newdocs
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\Lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\Lib\site-packages\numpy\lib\__init__.py", line 17, in <module>
from . import scimath as emath
ImportError: cannot import name scimath
C:\Users\charizard\AppData\Local\Enthought\Canopy\App>
C:\Users\charizard\AppData\Local\Enthought\Canopy\App>Uncaught exception captured
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "build\bdist.win-amd64\egg\canopy\app\main.py", line 53, in main
File "build\bdist.win-amd64\egg\canopy\app\application_launcher.py", line 350, in launch
File "build\bdist.win-amd64\egg\canopy\app\application.py", line 361, in run
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\envisage\ui\tasks\tasks_application.py", line 131, in run
started = self.start()
File "build\bdist.win-amd64\egg\canopy\app\application.py", line 295, in start
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\envisage\application.py", line 295, in start
self.plugin_manager.start()
File "build\bdist.win-amd64\egg\canopy\app\canopy_plugin_manager.py", line 140, in start
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\envisage\composite_plugin_manager.py", line 133, in start
self.start_plugin(plugin)
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\envisage\composite_plugin_manager.py", line 143, in start_plugin
plugin.activator.start_plugin(plugin)
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\envisage\plugin_activator.py", line 30, in start_plugin
plugin.start()
File "build/bdist.macosx-10.6-x86_64/egg/canopy_data_import_addon/plugin.py", line 79, in start
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\envisage\application.py", line 370, in get_service
protocol, query, minimize, maximize
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\envisage\service_registry.py", line 77, in get_service
services = self.get_services(protocol, query, minimize, maximize)
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\envisage\service_registry.py", line 114, in get_services
actual_protocol, name, obj, properties, service_id
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\envisage\service_registry.py", line 258, in _resolve_factory
obj = obj(**properties)
File "build\bdist.win-amd64\egg\canopy\plugin\plugin.py", line 183, in _create_package_manager_service
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\envisage\application.py", line 370, in get_service
protocol, query, minimize, maximize
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\envisage\service_registry.py", line 77, in get_service
services = self.get_services(protocol, query, minimize, maximize)
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\envisage\service_registry.py", line 114, in get_services
actual_protocol, name, obj, properties, service_id
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\envisage\service_registry.py", line 258, in _resolve_factory
obj = obj(**properties)
File "build\bdist.win-amd64\egg\canopy\accounts\plugin.py", line 69, in _create_account_service
File "build\bdist.win-amd64\egg\canopy\accounts\account_service.py", line 359, in __init__
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\traits\has_traits.py", line 3285, in _init_trait_listeners
getattr( self, '_init_trait_%s_listener' % data[0] )( name, *data )
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\traits\has_traits.py", line 3340, in _init_trait_delegate_listener
self.on_trait_change( notify, name_pattern, target=self )
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\traits\has_traits.py", line 2584, in on_trait_change
listener.register( self )
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\traits\traits_listener.py", line 433, in register
value = getattr( self, type )( new, name, False )
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\traits\traits_listener.py", line 701, in _register_simple
return next.register( getattr( object, name ) )
File "build\bdist.win-amd64\egg\canopy\accounts\account_service.py", line 308, in _preferences_default
File "build\bdist.win-amd64\egg\canopy\accounts\account_service.py", line 314, in _enstaller_config_default
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\enstaller\config.py", line 299, in from_file
ret = _create(fp)
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\enstaller\config.py", line 268, in _create
parsed = parse_assignments(fp)
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\egginst\utils.py", line 207, in parse_assignments
return _AssignmentParser().parse(file_or_filename.read())
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\egginst\utils.py", line 172, in parse
root = ast.parse(s)
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\ast.py", line 37, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
TypeError: compile() expected string without null bytes
Exception occurred in traits notification handler.
Please check the log file for details.
Exception occurred in traits notification handler for object: <canopy.logging.logging_service.LoggingService object at 0x00000000054EAA98>, trait: exception_added, old value: <undefined>, new value: <LogRecord: root, 40, build\bdist.win-amd64\egg\canopy\logging\logging_service.py, 154, "Uncaught exception captured">
Traceback (most recent call last):
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\traits\trait_notifiers.py", line 340, in __call__
self.handler( *args )
File "build\bdist.win-amd64\egg\canopy\logging\logging_service.py", line 203, in _exception_added_fired
File "build\bdist.win-amd64\egg\canopy\logging\logging_service.py", line 187, in _report_exception
File "build\bdist.win-amd64\egg\canopy\feedback\data_reporter.py", line 505, in start
File "build\bdist.win-amd64\egg\canopy\feedback\data_reporter_view.py", line 192, in __init__
File "build\bdist.win-amd64\egg\canopy\feedback\data_reporter_view.py", line 221, in setup_ui
File "build\bdist.win-amd64\egg\canopy\feedback\data_reporter_view.py", line 304, in __init__
File "build\bdist.win-amd64\egg\canopy\feedback\data_reporter.py", line 269, in _requester_email_default
File "build\bdist.win-amd64\egg\canopy\feedback\data_reporter.py", line 261, in _account_service_default
File "build\bdist.win-amd64\egg\canopy\accounts\account_service.py", line 359, in __init__
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\traits\has_traits.py", line 3285, in _init_trait_listeners
getattr( self, '_init_trait_%s_listener' % data[0] )( name, *data )
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\traits\has_traits.py", line 3340, in _init_trait_delegate_listener
self.on_trait_change( notify, name_pattern, target=self )
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\traits\has_traits.py", line 2584, in on_trait_change
listener.register( self )
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\traits\traits_listener.py", line 433, in register
value = getattr( self, type )( new, name, False )
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\traits\traits_listener.py", line 701, in _register_simple
return next.register( getattr( object, name ) )
File "build\bdist.win-amd64\egg\canopy\accounts\account_service.py", line 308, in _preferences_default
File "build\bdist.win-amd64\egg\canopy\accounts\account_service.py", line 314, in _enstaller_config_default
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\enstaller\config.py", line 299, in from_file
ret = _create(fp)
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\enstaller\config.py", line 268, in _create
parsed = parse_assignments(fp)
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\egginst\utils.py", line 207, in parse_assignments
return _AssignmentParser().parse(file_or_filename.read())
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\egginst\utils.py", line 172, in parse
root = ast.parse(s)
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\ast.py", line 37, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
TypeError: compile() expected string without null bytes
Exception occurred in traits notification handler for object: <canopy.logging.logging_service.LoggingService object at 0x00000000054EAA98>, trait: exception_added, old value: <undefined>, new value: <LogRecord: root, 40, build\bdist.win-amd64\egg\canopy\logging\logging_service.py, 154, "Uncaught exception captured">
Traceback (most recent call last):
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\traits\trait_notifiers.py", line 340, in __call__
self.handler( *args )
File "build\bdist.win-amd64\egg\canopy\logging\logging_service.py", line 203, in _exception_added_fired
File "build\bdist.win-amd64\egg\canopy\logging\logging_service.py", line 187, in _report_exception
File "build\bdist.win-amd64\egg\canopy\feedback\data_reporter.py", line 505, in start
File "build\bdist.win-amd64\egg\canopy\feedback\data_reporter_view.py", line 192, in __init__
File "build\bdist.win-amd64\egg\canopy\feedback\data_reporter_view.py", line 221, in setup_ui
File "build\bdist.win-amd64\egg\canopy\feedback\data_reporter_view.py", line 304, in __init__
File "build\bdist.win-amd64\egg\canopy\feedback\data_reporter.py", line 269, in _requester_email_default
File "build\bdist.win-amd64\egg\canopy\feedback\data_reporter.py", line 261, in _account_service_default
File "build\bdist.win-amd64\egg\canopy\accounts\account_service.py", line 359, in __init__
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\traits\has_traits.py", line 3285, in _init_trait_listeners
getattr( self, '_init_trait_%s_listener' % data[0] )( name, *data )
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\traits\has_traits.py", line 3340, in _init_trait_delegate_listener
self.on_trait_change( notify, name_pattern, target=self )
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\traits\has_traits.py", line 2584, in on_trait_change
listener.register( self )
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\traits\traits_listener.py", line 433, in register
value = getattr( self, type )( new, name, False )
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\traits\traits_listener.py", line 701, in _register_simple
return next.register( getattr( object, name ) )
File "build\bdist.win-amd64\egg\canopy\accounts\account_service.py", line 308, in _preferences_default
File "build\bdist.win-amd64\egg\canopy\accounts\account_service.py", line 314, in _enstaller_config_default
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\enstaller\config.py", line 299, in from_file
ret = _create(fp)
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\enstaller\config.py", line 268, in _create
parsed = parse_assignments(fp)
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\egginst\utils.py", line 207, in parse_assignments
return _AssignmentParser().parse(file_or_filename.read())
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\egginst\utils.py", line 172, in parse
root = ast.parse(s)
File "C:\Users\charizard\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\ast.py", line 37, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
TypeError: compile() expected string without null bytes
Please zip and email your file C:\Users\charizard\.enstaller4rc to support#enthought.com for forensics, and refer to this SO article. Then just delete that file, and I expect that you'll be able to start Canopy ok.