My code:
import statsmodels.formula.api as smf
model = smf.ols("Delivery Time ~ Sorting Time" , data = dataset).fit()
My error:
File "/usr/local/lib/python3.8/dist-packages/IPython/core/interactiveshell.py", line 3326, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-41-5de8902dbe7c>", line 2, in <module>
model = smf.ols("Delivery Time ~ Sorting Time" , data = dataset).fit()
File "/usr/local/lib/python3.8/dist-packages/statsmodels/base/model.py", line 169, in from_formula
tmp = handle_formula_data(data, None, formula, depth=eval_env,
File "/usr/local/lib/python3.8/dist-packages/statsmodels/formula/formulatools.py", line 63, in handle_formula_data
result = dmatrices(formula, Y, depth, return_type='dataframe',
File "/usr/local/lib/python3.8/dist-packages/patsy/highlevel.py", line 309, in dmatrices
(lhs, rhs) = _do_highlevel_design(formula_like, data, eval_env,
File "/usr/local/lib/python3.8/dist-packages/patsy/highlevel.py", line 164, in _do_highlevel_design
design_infos = _try_incr_builders(formula_like, data_iter_maker, eval_env,
File "/usr/local/lib/python3.8/dist-packages/patsy/highlevel.py", line 66, in _try_incr_builders
return design_matrix_builders([formula_like.lhs_termlist,
File "/usr/local/lib/python3.8/dist-packages/patsy/build.py", line 689, in design_matrix_builders
factor_states = _factors_memorize(all_factors, data_iter_maker, eval_env)
File "/usr/local/lib/python3.8/dist-packages/patsy/build.py", line 354, in _factors_memorize
which_pass = factor.memorize_passes_needed(state, eval_env)
File "/usr/local/lib/python3.8/dist-packages/patsy/eval.py", line 478, in memorize_passes_needed
subset_names = [name for name in ast_names(self.code)
File "/usr/local/lib/python3.8/dist-packages/patsy/eval.py", line 478, in <listcomp>
subset_names = [name for name in ast_names(self.code)
File "/usr/local/lib/python3.8/dist-packages/patsy/eval.py", line 109, in ast_names
for node in ast.walk(ast.parse(code)):
File "/usr/lib/python3.8/ast.py", line 47, in parse
return compile(source, filename, mode, flags,
File "<unknown>", line 1
Delivery Time
^
SyntaxError: invalid syntax
I tried to add parenthesis. I tried to add underscore to the strings. It still did not work.
Related
I was running a script to get data from excel for over a year using the Xlwings range command like so...
list=Range('A1:D10').value
Suddenly, it stopper working. I had changed nothing in the code nor the system, other than maybe installing another network card.
This is the error when trying to use the Range assignment now.
Traceback (most recent call last):
File "G:\python32\fetcher.py", line 61, in <module>
listFull = getComData()
File "G:\python32\fetcher.py", line 38, in getComData
listFull=Range('A4:H184').value
File "G:\python32\lib\site-packages\xlwings\main.py", line 1490, in __init__
impl = apps.active.range(cell1).impl
File "G:\python32\lib\site-packages\xlwings\main.py", line 439, in range
return Range(impl=self.impl.range(cell1, cell2))
File "G:\python32\lib\site-packages\xlwings\_xlwindows.py", line 457, in range
xl1 = self.xl.Range(arg1)
File "G:\python32\lib\site-packages\xlwings\_xlwindows.py", line 341, in xl
self._xl = get_xl_app_from_hwnd(self._hwnd)
File "G:\python32\lib\site-packages\xlwings\_xlwindows.py", line 251, in get_xl_app_from_hwnd
disp = COMRetryObjectWrapper(Dispatch(p))
File "G:\python32\lib\site-packages\win32com\client\__init__.py", line 96, in Dispatch
return __WrapDispatch(dispatch, userName, resultCLSID, typeinfo, clsctx=clsctx)
File "G:\python32\lib\site-packages\win32com\client\__init__.py", line 37, in __WrapDispatch
klass = gencache.GetClassForCLSID(resultCLSID)
File "G:\python32\lib\site-packages\win32com\client\gencache.py", line 180, in GetClassForCLSID
mod = GetModuleForCLSID(clsid)
File "G:\python32\lib\site-packages\win32com\client\gencache.py", line 223, in GetModuleForCLSID
mod = GetModuleForTypelib(typelibCLSID, lcid, major, minor)
File "G:\python32\lib\site-packages\win32com\client\gencache.py", line 259, in GetModuleForTypelib
mod = _GetModule(modName)
File "G:\python32\lib\site-packages\win32com\client\gencache.py", line 622, in _GetModule
mod = __import__(mod_name)
ValueError: source code string cannot contain null bytes
this is my error. I don't know what's my error is. And I really do not know what to do right now. I am using PyTorch-lightning with tensorboard. I do not where this error comes from, I can provide more details if you ask. I delete several error information because StackOverflow doesn't allow me to post so much code.
File "/home/jq/PycharmProjects/Unet/Code/Lit_train.py", line 49, in <module>
trainer.fit(model)
File "/home/jq/.local/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 859, in fit
self.single_gpu_train(model)
File "/home/jq/.local/lib/python3.6/site-packages/pytorch_lightning/trainer/distrib_parts.py", line 503, in single_gpu_train
self.run_pretrain_routine(model)
File "/home/jq/.local/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 1015, in run_pretrain_routine
self.train()
File "/home/jq/.local/lib/python3.6/site-packages/pytorch_lightning/trainer/training_loop.py", line 347, in train
self.run_training_epoch()
File "/home/jq/.local/lib/python3.6/site-packages/pytorch_lightning/trainer/training_loop.py", line 451, in run_training_epoch
self.run_evaluation(test_mode=self.testing)
File "/home/jq/.local/lib/python3.6/site-packages/pytorch_lightning/trainer/evaluation_loop.py", line 391, in run_evaluation
self.log_metrics(log_metrics, {})
File "/home/jq/.local/lib/python3.6/site-packages/pytorch_lightning/trainer/logging.py", line 74, in log_metrics
self.logger.save()
File "/home/jq/.local/lib/python3.6/site-packages/pytorch_lightning/utilities/distributed.py", line 10, in wrapped_fn
return fn(*args, **kwargs)
File "/home/jq/.local/lib/python3.6/site-packages/pytorch_lightning/loggers/tensorboard.py", line 161, in save
save_hparams_to_yaml(hparams_file, self.hparams)
File "/home/jq/.local/lib/python3.6/site-packages/pytorch_lightning/core/saving.py", line 151, in save_hparams_to_yaml
yaml.dump(hparams, fp)
File "/home/jq/.local/lib/python3.6/site-packages/yaml/__init__.py", line 290, in dump
return dump_all([data], stream, Dumper=Dumper, **kwds)
File "/home/jq/.local/lib/python3.6/site-packages/yaml/__init__.py", line 278, in dump_all
dumper.represent(data)
File "/home/jq/.local/lib/python3.6/site-packages/yaml/representer.py", line 27, in represent
node = self.represent_data(data)
File "/home/jq/.local/lib/python3.6/site-packages/yaml/representer.py", line 48, in represent_data
node = self.yaml_representers[data_types[0]](self, data)
File "/home/jq/.local/lib/python3.6/site-packages/yaml/representer.py", line 207, in represent_dict
return self.represent_mapping('tag:yaml.org,2002:map', data)
File "/home/jq/.local/lib/python3.6/site-packages/yaml/representer.py", line 118, in represent_mapping
node_value = self.represent_data(item_value)
File "/home/jq/.local/lib/python3.6/site-packages/yaml/representer.py", line 52, in represent_data
node = self.yaml_multi_representers[data_type](self, data)
File "/home/jq/.local/lib/python3.6/site-packages/yaml/representer.py", line 343, in represent_object
'tag:yaml.org,2002:python/object:'+function_name, state)
File "/home/jq/.local/lib/python3.6/site-packages/yaml/representer.py", line 118, in represent_mapping
node_value = self.represent_data(item_value)
File "/home/jq/.local/lib/python3.6/site-packages/yaml/representer.py", line 52, in represent_data
node = self.yaml_multi_representers[data_type](self, data)
File "/home/jq/.local/lib/python3.6/site-packages/yaml/representer.py", line 346, in represent_object
return self.represent_sequence(tag+function_name, args)
File "/home/jq/.local/lib/python3.6/site-packages/yaml/representer.py", line 92, in represent_sequence
node_item = self.represent_data(item)
File "/home/jq/.local/lib/python3.6/site-packages/yaml/representer.py", line 52, in represent_data
node = self.yaml_multi_representers[data_type](self, data)
File "/home/jq/.local/lib/python3.6/site-packages/yaml/representer.py", line 343, in represent_object
File "/home/jq/.local/lib/python3.6/site-packages/yaml/representer.py", line 52, in represent_data
node = self.yaml_multi_representers[data_type](self, data)
File "/home/jq/.local/lib/python3.6/site-packages/yaml/representer.py", line 317, in represent_object
reduce = data.__reduce_ex__(2)
TypeError: can't pickle _thread.lock objects
Exception ignored in: <object repr() failed>
Traceback (most recent call last):
File "/home/jq/.local/lib/python3.6/site-packages/tqdm/std.py", line 1086, in __del__
File "/home/jq/.local/lib/python3.6/site-packages/tqdm/std.py", line 1293, in close
File "/home/jq/.local/lib/python3.6/site-packages/tqdm/std.py", line 1471, in display
File "/home/jq/.local/lib/python3.6/site-packages/tqdm/std.py", line 1089, in __repr__
File "/home/jq/.local/lib/python3.6/site-packages/tqdm/std.py", line 1433, in format_dict
TypeError: 'NoneType' object is not iterable
I have a data frame which contains multivariate time series data. It has columns: fundId (each entity), periodId(time stamp), v1, v2, v3 ...
I want to extract features from those times series for each fund over time. Like: fundId v1.max, v1.min, v1.median, ..., v2.max, v2.min, v2.median, ...
I encountered an AttributeError when use function extract_features from library tsfresh. I'm new to Python but I think it might related to multiprocessing.
The trackback shows:
Traceback (most recent call last):
File "mypath\lib\site-packages\IPython\core\interactiveshell.py", line 3325, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in
HFeatures = extract_features(FundCharc, column_id='fundId', column_sort='periodId')
File "mypath\lib\site-packages\tsfresh\feature_extraction\extraction.py", line 178, in extract_features
distributor=distributor)
File "mypath\lib\site-packages\tsfresh\feature_extraction\extraction.py", line 313, in _do_extraction
progressbar_title="Feature Extraction")
File "mypath\lib\site-packages\tsfresh\utilities\distribution.py", line 349, in init
self.pool = Pool(processes=n_workers)
File "C:\ProgramData\Miniconda3\lib\multiprocessing\context.py", line 119, in Pool
context=self.get_context())
File "C:\ProgramData\Miniconda3\lib\multiprocessing\pool.py", line 176, in init
self._repopulate_pool()
File "C:\ProgramData\Miniconda3\lib\multiprocessing\pool.py", line 241, in _repopulate_pool
w.start()
File "C:\ProgramData\Miniconda3\lib\multiprocessing\process.py", line 112, in start
self._popen = self._Popen(self)
File "C:\ProgramData\Miniconda3\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)
File "C:\ProgramData\Miniconda3\lib\multiprocessing\popen_spawn_win32.py", line 33, in init
prep_data = spawn.get_preparation_data(process_obj._name)
File "C:\ProgramData\Miniconda3\lib\multiprocessing\spawn.py", line 172, in get_preparation_data
main_mod_name = getattr(main_module.spec, "name", None)
AttributeError: module 'main' has no attribute 'spec'
from tsfresh import extract_features
HFeatures = extract_features(FundCharc, column_id='fundId', column_sort='periodId')
I am trying to train Autoencoder by Chainer in python and wrote below code. But it does not work. Why??
class Autoencoder(Chain):
def __init__(self):
super().__init__()
with self.init_scope():
self.l1 = L.Linear(3,2)
self.l2 = L.Linear(2,3)
def __call__(self,x):
h1 = self.l1(x)
h2 = self.l2(h1)
return h2
class Dataset(dataset.DatasetMixin):
def __init__(self,number_of_data, show_initial = False):
noise_level = 1
self.data = np.zeros((number_of_data,3),dtype = np.float32)
OA_vector = np.array([3,2,1])
OB_vector = np.array([2,-1,1])
t = np.random.uniform(-0.5,0.5,number_of_data)
s = np.random.uniform(-0.5,0.5,number_of_data)
for i in range(0,number_of_data):
noise = np.random.uniform(-noise_level, noise_level,3)
self.data[i] = t[i]*OA_vector + s[i]*OB_vector + noise
def __len__(self):
return self.data.shape[0]
def get_example(self,idx):
return self.data[idx]
if __name__ == "__main__":
n_epoch = 5
batch_size = 100
number_of_data = 1000 #データ数
train_data = Dataset(number_of_data,False)
model = Autoencoder()
optimizer = optimizers.SGD(lr=0.05).setup(model)
train_iter = iterators.SerialIterator(train_data,batch_size)
updater = training.StandardUpdater(train_iter,optimizer,device=0)
trainer = training.Trainer(updater,(n_epoch,"epoch"),out="result")
trainer.run()
I am using Chainer. And the Dataset makes 3 dimensitonal vectors. The number of the vectors is "number_of_data".
Should I do that without using trainer?
I don't understand where problem is.
EDIT
When we run above code with device=0, we have error like below.
Exception in main training loop: Unsupported type <class 'NoneType'>
Traceback (most recent call last):
File "/home/****/.local/lib/python3.5/site-packages/chainer/training/trainer.py", line 308, in run
update()
File "/home/****/.local/lib/python3.5/site-packages/chainer/training/updaters/standard_updater.py", line 149, in update
self.update_core()
File "/home/****/.local/lib/python3.5/site-packages/chainer/training/updaters/standard_updater.py", line 164, in update_core
optimizer.update(loss_func, in_arrays)
File "/home/****/.local/lib/python3.5/site-packages/chainer/optimizer.py", line 655, in update
loss.backward(loss_scale=self._loss_scale)
File "/home/****/.local/lib/python3.5/site-packages/chainer/variable.py", line 966, in backward
self._backward_main(retain_grad, loss_scale)
File "/home/****/.local/lib/python3.5/site-packages/chainer/variable.py", line 1095, in _backward_main
target_input_indexes, out_grad, in_grad)
File "/home/****/.local/lib/python3.5/site-packages/chainer/function_node.py", line 548, in backward_accumulate
gxs = self.backward(target_input_indexes, grad_outputs)
File "/home/****/.local/lib/python3.5/site-packages/chainer/functions/activation/relu.py", line 73, in backward
return ReLUGrad2(y).apply((gy,))
File "/home/****/.local/lib/python3.5/site-packages/chainer/function_node.py", line 258, in apply
outputs = self.forward(in_data)
File "/home/****/.local/lib/python3.5/site-packages/chainer/function_node.py", line 368, in forward
return self.forward_cpu(inputs)
File "/home/****/.local/lib/python3.5/site-packages/chainer/functions/activation/relu.py", line 97, in forward_cpu
y = (self.b > 0) * inputs[0]
File "cupy/core/core.pyx", line 1310, in cupy.core.core.ndarray.__mul__
File "cupy/core/elementwise.pxi", line 753, in cupy.core.core.ufunc.__call__
File "cupy/core/elementwise.pxi", line 68, in cupy.core.core._preprocess_args
Will finalize trainer extensions and updater before reraising the exception.
Traceback (most recent call last):
File "AC.py", line 70, in <module>
trainer.run()
File "/home/****/.local/lib/python3.5/site-packages/chainer/training/trainer.py", line 322, in run
six.reraise(*sys.exc_info())
File "/home/****/.local/lib/python3.5/site-packages/six.py", line 693, in reraise
raise value
File "/home/****/.local/lib/python3.5/site-packages/chainer/training/trainer.py", line 308, in run
update()
File "/home/****/.local/lib/python3.5/site-packages/chainer/training/updaters/standard_updater.py", line 149, in update
self.update_core()
File "/home/****/.local/lib/python3.5/site-packages/chainer/training/updaters/standard_updater.py", line 164, in update_core
optimizer.update(loss_func, in_arrays)
File "/home/****/.local/lib/python3.5/site-packages/chainer/optimizer.py", line 655, in update
loss.backward(loss_scale=self._loss_scale)
File "/home/****/.local/lib/python3.5/site-packages/chainer/variable.py", line 966, in backward
self._backward_main(retain_grad, loss_scale)
File "/home/****/.local/lib/python3.5/site-packages/chainer/variable.py", line 1095, in _backward_main
target_input_indexes, out_grad, in_grad)
File "/home/****/.local/lib/python3.5/site-packages/chainer/function_node.py", line 548, in backward_accumulate
gxs = self.backward(target_input_indexes, grad_outputs)
File "/home/****/.local/lib/python3.5/site-packages/chainer/functions/activation/relu.py", line 73, in backward
return ReLUGrad2(y).apply((gy,))
File "/home/****/.local/lib/python3.5/site-packages/chainer/function_node.py", line 258, in apply
outputs = self.forward(in_data)
File "/home/****/.local/lib/python3.5/site-packages/chainer/function_node.py", line 368, in forward
return self.forward_cpu(inputs)
File "/home/****/.local/lib/python3.5/site-packages/chainer/functions/activation/relu.py", line 97, in forward_cpu
y = (self.b > 0) * inputs[0]
File "cupy/core/core.pyx", line 1310, in cupy.core.core.ndarray.__mul__
File "cupy/core/elementwise.pxi", line 753, in cupy.core.core.ufunc.__call__
File "cupy/core/elementwise.pxi", line 68, in cupy.core.core._preprocess_args
TypeError: Unsupported type <class 'NoneType'>
When we run above code with device=-1, we have error like below.
Exception in main training loop: unsupported operand type(s) for *: 'bool' and 'NoneType'
Traceback (most recent call last):
File "/home/****/.local/lib/python3.5/site-packages/chainer/training/trainer.py", line 308, in run
update()
File "/home/****/.local/lib/python3.5/site-packages/chainer/training/updaters/standard_updater.py", line 149, in update
self.update_core()
File "/home/****/.local/lib/python3.5/site-packages/chainer/training/updaters/standard_updater.py", line 164, in update_core
optimizer.update(loss_func, in_arrays)
File "/home/****/.local/lib/python3.5/site-packages/chainer/optimizer.py", line 655, in update
loss.backward(loss_scale=self._loss_scale)
File "/home/****/.local/lib/python3.5/site-packages/chainer/variable.py", line 966, in backward
self._backward_main(retain_grad, loss_scale)
File "/home/****/.local/lib/python3.5/site-packages/chainer/variable.py", line 1095, in _backward_main
target_input_indexes, out_grad, in_grad)
File "/home/****/.local/lib/python3.5/site-packages/chainer/function_node.py", line 548, in backward_accumulate
gxs = self.backward(target_input_indexes, grad_outputs)
File "/home/****/.local/lib/python3.5/site-packages/chainer/functions/activation/relu.py", line 73, in backward
return ReLUGrad2(y).apply((gy,))
File "/home/****/.local/lib/python3.5/site-packages/chainer/function_node.py", line 258, in apply
outputs = self.forward(in_data)
File "/home/****/.local/lib/python3.5/site-packages/chainer/function_node.py", line 368, in forward
return self.forward_cpu(inputs)
File "/home/****/.local/lib/python3.5/site-packages/chainer/functions/activation/relu.py", line 97, in forward_cpu
y = (self.b > 0) * inputs[0]
Will finalize trainer extensions and updater before reraising the exception.
Traceback (most recent call last):
File "AC.py", line 70, in <module>
trainer.run()
File "/home/****/.local/lib/python3.5/site-packages/chainer/training/trainer.py", line 322, in run
six.reraise(*sys.exc_info())
File "/home/****/.local/lib/python3.5/site-packages/six.py", line 693, in reraise
raise value
File "/home/****/.local/lib/python3.5/site-packages/chainer/training/trainer.py", line 308, in run
update()
File "/home/****/.local/lib/python3.5/site-packages/chainer/training/updaters/standard_updater.py", line 149, in update
self.update_core()
File "/home/****/.local/lib/python3.5/site-packages/chainer/training/updaters/standard_updater.py", line 164, in update_core
optimizer.update(loss_func, in_arrays)
File "/home/****/.local/lib/python3.5/site-packages/chainer/optimizer.py", line 655, in update
loss.backward(loss_scale=self._loss_scale)
File "/home/****/.local/lib/python3.5/site-packages/chainer/variable.py", line 966, in backward
self._backward_main(retain_grad, loss_scale)
File "/home/****/.local/lib/python3.5/site-packages/chainer/variable.py", line 1095, in _backward_main
target_input_indexes, out_grad, in_grad)
File "/home/****/.local/lib/python3.5/site-packages/chainer/function_node.py", line 548, in backward_accumulate
gxs = self.backward(target_input_indexes, grad_outputs)
File "/home/****/.local/lib/python3.5/site-packages/chainer/functions/activation/relu.py", line 73, in backward
return ReLUGrad2(y).apply((gy,))
File "/home/****/.local/lib/python3.5/site-packages/chainer/function_node.py", line 258, in apply
outputs = self.forward(in_data)
File "/home/****/.local/lib/python3.5/site-packages/chainer/function_node.py", line 368, in forward
return self.forward_cpu(inputs)
File "/home/****/.local/lib/python3.5/site-packages/chainer/functions/activation/relu.py", line 97, in forward_cpu
y = (self.b > 0) * inputs[0]
TypeError: unsupported operand type(s) for *: 'bool' and 'NoneType'
I think the model need to return loss in __call__ method.
Sample modification is as follows:
class Autoencoder(Chain):
def __init__(self):
super().__init__()
with self.init_scope():
self.l1 = L.Linear(3,2)
self.l2 = L.Linear(2,3)
def forward(self,x):
h1 = self.l1(x)
h2 = self.l2(h1)
return h2
def __call__(self,x):
h = self.forward(x)
# Instead of h, __call__ should return loss.
loss = F.mean_squared_error(h, x)
return loss
I'm trying to compile a simple standalone python application using Nuitka. I was able to do this using just the standard library.
I'm now looking to bring in some extra dependancies but I am now receiving errors from Nuitka I'm unable to interpret.
I've tried to import numpy into the project which looks like:
Structure:
npg
__init__.py
__main__.py
Pipfile
Pipfile.lock
Here's the __main__.py
import numpy as np
def main():
print('hello Nuitka')
print('hello numpy', np.__version__)
if __name__ == '__main__':
main()
I then run python -m nuitka npg/__main__.py --standalone and get the error:
Nuitka:WARNING:/usr/local/lib/python3.6/site-packages/numpy/testing/_private/pytesttester.py:125: Cannot find 'pytest' in package 'numpy.testing._private' as absolute import (tried pytest).
Nuitka:WARNING:/usr/local/lib/python3.6/site-packages/setuptools/command/egg_info.py:20: Cannot find 'setuptools.extern.six.moves' in package 'setuptools.command' as absolute import (tried setuptools.extern.six.moves).
Nuitka:WARNING:/usr/local/lib/python3.6/site-packages/setuptools/command/egg_info.py:20: Cannot find 'setuptools.extern.six' in package 'setuptools.command' as absolute import (tried setuptools.extern.six).
Nuitka:WARNING:/usr/local/lib/python3.6/site-packages/setuptools/glob.py:13: Cannot find 'setuptools.extern.six' in package 'setuptools' as absolute import (tried setuptools.extern.six).
Nuitka:WARNING:Problem at '<SourceCodeReference to /usr/src/app/npg/__main__.py:4>' with FunctionDef(name='main', args=arguments(args=[], vararg=None, kwonlyargs=[], kw_defaults=[], kwarg=None, defaults=[]), body=[Expr(value=Call(func=Name(id='print', ctx=Load()), args=[Str(s='hello Nuitka')], keywords=[])), Expr(value=Call(func=Name(id='print', ctx=Load()), args=[Str(s='hello numpy'), Attribute(value=Name(id='np', ctx=Load()), attr='__version__', ctx=Load())], keywords=[]))], decorator_list=[], returns=None).
Problem with statement at /usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py:566:
-> from __main__ import __requires__
Problem with statement at /usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py:565:
-> try:
Problem with statement at /usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py:559:
-> #classmethod
Problem with statement at /usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py:559:
-> #classmethod
Problem with statement at /usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py:543:
-> class WorkingSet:
Problem with statement at /usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py:543:
-> class WorkingSet:
Problem with statement at /usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py:543:
-> class WorkingSet:
Problem with statement at /usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py:543:
-> class WorkingSet:
Nuitka:INFO:Interrupted while working on '<Node 'COMPILED_PYTHON_PACKAGE' with {'filename': '/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py', 'package': None, 'name': 'pkg_resources'}>'.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/nuitka/__main__.py", line 218, in <module>
main()
File "/usr/local/lib/python3.6/site-packages/nuitka/__main__.py", line 212, in main
MainControl.main()
File "/usr/local/lib/python3.6/site-packages/nuitka/MainControl.py", line 800, in main
filename = filename
File "/usr/local/lib/python3.6/site-packages/nuitka/MainControl.py", line 152, in createNodeTree
Optimization.optimize(main_module.getOutputFilename())
File "/usr/local/lib/python3.6/site-packages/nuitka/optimizations/Optimization.py", line 533, in optimize
makeOptimizationPass(initial_pass = True)
File "/usr/local/lib/python3.6/site-packages/nuitka/optimizations/Optimization.py", line 446, in makeOptimizationPass
changed = optimizeModule(current_module)
File "/usr/local/lib/python3.6/site-packages/nuitka/optimizations/Optimization.py", line 173, in optimizeModule
changed = optimizeCompiledPythonModule(module)
File "/usr/local/lib/python3.6/site-packages/nuitka/optimizations/Optimization.py", line 97, in optimizeCompiledPythonModule
module.computeModule()
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/ModuleNodes.py", line 461, in computeModule
trace_collection = self.trace_collection
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/StatementNodes.py", line 165, in computeStatementsSequence
trace_collection
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/FrameNodes.py", line 195, in computeStatementsSequence
statement = statement
File "/usr/local/lib/python3.6/site-packages/nuitka/optimizations/TraceCollections.py", line 575, in onStatement
statement.computeStatement(self)
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/TryNodes.py", line 129, in computeStatement
trace_collection = trace_collection
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/StatementNodes.py", line 169, in computeStatementsSequence
statement = statement
File "/usr/local/lib/python3.6/site-packages/nuitka/optimizations/TraceCollections.py", line 575, in onStatement
statement.computeStatement(self)
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/AssignNodes.py", line 297, in computeStatement
trace_collection.onExpression(self.getAssignSource())
File "/usr/local/lib/python3.6/site-packages/nuitka/optimizations/TraceCollections.py", line 550, in onExpression
trace_collection = self
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/OutlineNodes.py", line 247, in computeExpressionRaw
trace_collection = trace_collection
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/StatementNodes.py", line 169, in computeStatementsSequence
statement = statement
File "/usr/local/lib/python3.6/site-packages/nuitka/optimizations/TraceCollections.py", line 575, in onStatement
statement.computeStatement(self)
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/TryNodes.py", line 129, in computeStatement
trace_collection = trace_collection
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/StatementNodes.py", line 169, in computeStatementsSequence
statement = statement
File "/usr/local/lib/python3.6/site-packages/nuitka/optimizations/TraceCollections.py", line 575, in onStatement
statement.computeStatement(self)
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/TryNodes.py", line 129, in computeStatement
trace_collection = trace_collection
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/StatementNodes.py", line 165, in computeStatementsSequence
trace_collection
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/FrameNodes.py", line 195, in computeStatementsSequence
statement = statement
File "/usr/local/lib/python3.6/site-packages/nuitka/optimizations/TraceCollections.py", line 575, in onStatement
statement.computeStatement(self)
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/LocalsDictNodes.py", line 406, in computeStatement
trace_collection = trace_collection
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/NodeBases.py", line 933, in computeStatementSubExpressions
expression = expression
File "/usr/local/lib/python3.6/site-packages/nuitka/optimizations/TraceCollections.py", line 550, in onExpression
trace_collection = self
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/ExpressionBases.py", line 976, in computeExpressionRaw
expression = trace_collection.onExpression(sub_expression)
File "/usr/local/lib/python3.6/site-packages/nuitka/optimizations/TraceCollections.py", line 550, in onExpression
trace_collection = self
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/ExpressionBases.py", line 976, in computeExpressionRaw
expression = trace_collection.onExpression(sub_expression)
File "/usr/local/lib/python3.6/site-packages/nuitka/optimizations/TraceCollections.py", line 550, in onExpression
trace_collection = self
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/ExpressionBases.py", line 976, in computeExpressionRaw
expression = trace_collection.onExpression(sub_expression)
File "/usr/local/lib/python3.6/site-packages/nuitka/optimizations/TraceCollections.py", line 550, in onExpression
trace_collection = self
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/FunctionNodes.py", line 901, in computeExpressionRaw
function_body.computeFunctionRaw(trace_collection)
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/FunctionNodes.py", line 408, in computeFunctionRaw
self.computeFunction(trace_collection)
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/FunctionNodes.py", line 422, in computeFunction
trace_collection = trace_collection
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/StatementNodes.py", line 169, in computeStatementsSequence
statement = statement
File "/usr/local/lib/python3.6/site-packages/nuitka/optimizations/TraceCollections.py", line 575, in onStatement
statement.computeStatement(self)
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/TryNodes.py", line 129, in computeStatement
trace_collection = trace_collection
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/StatementNodes.py", line 165, in computeStatementsSequence
trace_collection
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/FrameNodes.py", line 195, in computeStatementsSequence
statement = statement
File "/usr/local/lib/python3.6/site-packages/nuitka/optimizations/TraceCollections.py", line 575, in onStatement
statement.computeStatement(self)
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/TryNodes.py", line 129, in computeStatement
trace_collection = trace_collection
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/StatementNodes.py", line 169, in computeStatementsSequence
statement = statement
File "/usr/local/lib/python3.6/site-packages/nuitka/optimizations/TraceCollections.py", line 575, in onStatement
statement.computeStatement(self)
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/AssignNodes.py", line 297, in computeStatement
trace_collection.onExpression(self.getAssignSource())
File "/usr/local/lib/python3.6/site-packages/nuitka/optimizations/TraceCollections.py", line 550, in onExpression
trace_collection = self
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/ExpressionBases.py", line 1054, in computeExpressionRaw
expression = sub_expression
File "/usr/local/lib/python3.6/site-packages/nuitka/optimizations/TraceCollections.py", line 550, in onExpression
trace_collection = self
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/ExpressionBases.py", line 998, in computeExpressionRaw
trace_collection = trace_collection
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/ImportNodes.py", line 400, in computeExpression
module_name = imported_module_name
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/ImportNodes.py", line 290, in _attemptRecursion
module_package = module_package
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/ImportNodes.py", line 222, in _consider
reason = reason
File "/usr/local/lib/python3.6/site-packages/nuitka/importing/Recursion.py", line 169, in recurseTo
reason = reason
File "/usr/local/lib/python3.6/site-packages/nuitka/importing/Recursion.py", line 92, in _recurseTo
is_main = False
File "/usr/local/lib/python3.6/site-packages/nuitka/tree/Building.py", line 1055, in createModuleTree
is_main = is_main
File "/usr/local/lib/python3.6/site-packages/nuitka/tree/Building.py", line 760, in buildParseTree
source_ref = source_ref
File "/usr/local/lib/python3.6/site-packages/nuitka/tree/TreeHelpers.py", line 384, in buildStatementsNode
statements = buildNodeList(provider, nodes, source_ref, allow_none = True)
File "/usr/local/lib/python3.6/site-packages/nuitka/tree/TreeHelpers.py", line 338, in buildNodeList
entry = buildNode(provider, node, node_source_ref, allow_none)
File "/usr/local/lib/python3.6/site-packages/nuitka/tree/TreeHelpers.py", line 295, in buildNode
source_ref = source_ref
File "/usr/local/lib/python3.6/site-packages/nuitka/tree/ReformulationFunctionStatements.py", line 153, in buildFunctionNode
source_ref = source_ref
File "/usr/local/lib/python3.6/site-packages/nuitka/tree/ReformulationFunctionStatements.py", line 799, in buildFunctionWithParsing
source_ref = source_ref
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/FunctionNodes.py", line 452, in __init__
source_ref = source_ref
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/FunctionNodes.py", line 386, in __init__
setLocalsDictType(self.locals_dict_name, "python3_function")
File "/usr/local/lib/python3.6/site-packages/nuitka/nodes/LocalsScopes.py", line 30, in setLocalsDictType
assert locals_dict_name not in locals_dict_handles, locals_dict_name
AssertionError: locals___main__$$$function_1_main
I'm use how to interpret that error. Looks like it's having problems with the syntax of the Python's standard libraries import machinery.