Hi,


I've hit a bunch of different errors at once - NoSectionError, KeyError, 
PermissionError, and TypeError - while trying to train a LSTM-CNN model on 
Jupyter Notebook. The model's code is given in EEGLearn 
(https://github.com/pbashivan/EEGLearn).


These are my configurations:

Python 3.7.0 (Anaconda distribution)

Theano 0.8.2 (because this is the version Lasagne recommends) - installed using 
pip

Lasagne 0.1 - installed using pip


I tried to *print(theano.config)*, but as the code between '=====' shows, it 
didn't work...


=====

*ERROR WHEN PRINTING THEANO.CONFIG*


Python 3.7.0 (default, Jun 28 2018, 08:04:48) [MSC v.1912 64 bit (AMD64)] :: 
Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import theano
>>> print(theano.config)


Traceback (most recent call last):
  File "C:\Anaconda\envs\py36gpu\lib\site-packages\theano\configparser.py", 
line 159, in fetch_val_for_key
    return theano_cfg.get(section, option)
  File "C:\Anaconda\envs\py36gpu\lib\configparser.py", line 780, in get
    d = self._unify_values(section, vars)
  File "C:\Anaconda\envs\py36gpu\lib\configparser.py", line 1146, in 
_unify_values
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'blas'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Anaconda\envs\py36gpu\lib\site-packages\theano\configparser.py", 
line 317, in __get__
    delete_key=delete_key)
  File "C:\Anaconda\envs\py36gpu\lib\site-packages\theano\configparser.py", 
line 163, in fetch_val_for_key
    raise KeyError(key)
KeyError: 'blas.ldflags'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Anaconda\envs\py36gpu\lib\site-packages\theano\gof\cmodule.py", line 
1748, in _try_compile_tmp
    os.remove(exe_path + ".exe")
PermissionError: [WinError 32] The process cannot access the file because it is 
being used by another process: 
'C:\\Users\\Michelle\\AppData\\Local\\Temp\\try_blas_hzw0uodq.exe'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Anaconda\envs\py36gpu\lib\site-packages\theano\configparser.py", 
line 197, in __str__
    _config_print(self.__class__, sio, print_doc=print_doc)
  File "C:\Anaconda\envs\py36gpu\lib\site-packages\theano\configparser.py", 
line 173, in _config_print
    print("    Value: ", cv.__get__(True, None), file=buf)
  File "C:\Anaconda\envs\py36gpu\lib\site-packages\theano\configparser.py", 
line 321, in __get__
    val_str = self.default()
  File "C:\Anaconda\envs\py36gpu\lib\site-packages\theano\configdefaults.py", 
line 1243, in default_blas_ldflags
    res = try_blas_flag(ret)
  File "C:\Anaconda\envs\py36gpu\lib\site-packages\theano\configdefaults.py", 
line 1300, in try_blas_flag
    flags=cflags, try_run=True)
  File "C:\Anaconda\envs\py36gpu\lib\site-packages\theano\gof\cmodule.py", line 
2070, in try_compile_tmp
    theano.config.cxx)
  File "C:\Anaconda\envs\py36gpu\lib\site-packages\theano\gof\cmodule.py", line 
1753, in _try_compile_tmp
    err += "\n" + str(e)
TypeError: can't concat str to bytes

=====


*ERROR WHEN TRAINING LSTM-CNN MODEL ON JUPYTER NOTEBOOK*


---------------------------------------------------------------------------NoSectionError
                            Traceback (most recent call 
last)C:\Anaconda\envs\py36gpu\lib\site-packages\theano\configparser.py in 
fetch_val_for_key(key, delete_key)    158         try:--> 159             
return theano_cfg.get(section, option)    160         except 
ConfigParser.InterpolationError:
C:\Anaconda\envs\py36gpu\lib\configparser.py in get(self, section, option, raw, 
vars, fallback)    779         try:--> 780             d = 
self._unify_values(section, vars)    781         except NoSectionError:
C:\Anaconda\envs\py36gpu\lib\configparser.py in _unify_values(self, section, 
vars)   1145             if section != self.default_section:-> 1146             
    raise NoSectionError(section) from None   1147         # Update with the 
entry specific variables
NoSectionError: No section: 'blas'

During handling of the above exception, another exception occurred:
KeyError                                  Traceback (most recent call 
last)C:\Anaconda\envs\py36gpu\lib\site-packages\theano\configparser.py in 
__get__(self, cls, type_, delete_key)    316                 val_str = 
fetch_val_for_key(self.fullname,--> 317                                         
    delete_key=delete_key)    318                 self.is_default = False
C:\Anaconda\envs\py36gpu\lib\site-packages\theano\configparser.py in 
fetch_val_for_key(key, delete_key)    162     except 
(ConfigParser.NoOptionError, ConfigParser.NoSectionError):--> 163         raise 
KeyError(key)    164 
KeyError: 'blas.ldflags'

During handling of the above exception, another exception occurred:
PermissionError                           Traceback (most recent call 
last)C:\Anaconda\envs\py36gpu\lib\site-packages\theano\gof\cmodule.py in 
_try_compile_tmp(src_code, tmp_prefix, flags, try_run, output, compiler)   1747 
                    if os.path.exists(exe_path + ".exe"):-> 1748                
         os.remove(exe_path + ".exe")   1749         except OSError as e:
PermissionError: [WinError 32] The process cannot access the file because it is 
being used by another process: 
'C:\\Users\\Michelle\\AppData\\Local\\Temp\\try_blas_3re_z5zh.exe'

During handling of the above exception, another exception occurred:
TypeError                                 Traceback (most recent call 
last)<ipython-input-6-fda1833d65b3> in <module>()     46     print('\n')     47 
    print('Training the LSTM-CONV Model...')---> 48     train(images_timewin, 
np.squeeze(feats[:, -1]) - 1, fold_pairs[2], 'mix')     49      50     
print('Done!')
<ipython-input-5-3ff2d48c8aab> in train(images, labels, fold, model_type, 
batch_size, num_epochs)    336     # Create a loss expression for training, 
i.e., a scalar objective we want    337     # to minimize (for our multi-class 
problem, it is the cross-entropy loss):--> 338     prediction = 
lasagne.layers.get_output(network)    339     loss = 
lasagne.objectives.categorical_crossentropy(prediction, target_var)    340     
loss = loss.mean()
C:\Anaconda\envs\py36gpu\lib\site-packages\lasagne\layers\helper.py in 
get_output(layer_or_layers, inputs, **kwargs)    183                            
      "mapping this layer to an input expression."    184                       
           % layer)--> 185             all_outputs[layer] = 
layer.get_output_for(layer_inputs, **kwargs)    186     # return the output(s) 
of the requested layer(s) only    187     try:
C:\Anaconda\envs\py36gpu\lib\site-packages\lasagne\layers\recurrent.py in 
get_output_for(self, inputs, **kwargs)   1048                 
truncate_gradient=self.gradient_steps,   1049                 
non_sequences=non_seqs,-> 1050                 strict=True)[0]   1051    1052   
      # dimshuffle back to (n_batch, n_time_steps, n_features))
C:\Anaconda\envs\py36gpu\lib\site-packages\theano\scan_module\scan.py in 
scan(fn, sequences, outputs_info, non_sequences, n_steps, truncate_gradient, 
go_backwards, mode, name, profile, allow_gc, strict)   1016     info['strict'] 
= strict   1017 -> 1018     local_op = scan_op.Scan(inner_inputs, new_outs, 
info)   1019    1020     ##
C:\Anaconda\envs\py36gpu\lib\site-packages\theano\scan_module\scan_op.py in 
__init__(self, inputs, outputs, info, typeConstructor)    212             
self._cmodule_key = gof.CLinker().cmodule_key_variables(self.inputs,    213     
                                                                
self.outputs,--> 214                                                            
         [])    215             self._hash_inner_graph = 
hash(self._cmodule_key)    216 
C:\Anaconda\envs\py36gpu\lib\site-packages\theano\gof\cc.py in 
cmodule_key_variables(self, inputs, outputs, no_recycling, compile_args, 
libraries, header_dirs, insert_config_md5, c_compiler)   1312         return 
self.cmodule_key_(fgraph, no_recycling, compile_args,   1313                    
              libraries, header_dirs, insert_config_md5,-> 1314                 
                 c_compiler)   1315    1316     def cmodule_key_(self, fgraph, 
no_recycling, compile_args=None,
C:\Anaconda\envs\py36gpu\lib\site-packages\theano\gof\cc.py in 
cmodule_key_(self, fgraph, no_recycling, compile_args, libraries, header_dirs, 
insert_config_md5, c_compiler)   1371         # can lead to a different 
compiled file with the same source code.   1372         if insert_config_md5:-> 
1373             sig.append('md5:' + theano.configparser.get_config_md5())   
1374         else:   1375             sig.append('md5: <omitted>')
C:\Anaconda\envs\py36gpu\lib\site-packages\theano\configparser.py in 
get_config_md5()    186                       key=lambda cv: cv.fullname)    
187     return theano.gof.utils.hash_from_code('\n'.join(--> 188         ['%s = 
%s' % (cv.fullname, cv.__get__(True, None)) for cv in all_opts]))    189     
190 
C:\Anaconda\envs\py36gpu\lib\site-packages\theano\configparser.py in 
<listcomp>(.0)    186                       key=lambda cv: cv.fullname)    187  
   return theano.gof.utils.hash_from_code('\n'.join(--> 188         ['%s = %s' 
% (cv.fullname, cv.__get__(True, None)) for cv in all_opts]))    189     190 
C:\Anaconda\envs\py36gpu\lib\site-packages\theano\configparser.py in 
__get__(self, cls, type_, delete_key)    319             except KeyError:    
320                 if callable(self.default):--> 321                     
val_str = self.default()    322                 else:    323                    
 val_str = self.default
C:\Anaconda\envs\py36gpu\lib\site-packages\theano\configdefaults.py in 
default_blas_ldflags()   1241         if any('mkl' in fl for fl in ret):   1242 
            ret.extend(['-lm', '-lm'])-> 1243         res = try_blas_flag(ret)  
 1244         if res:   1245             return res
C:\Anaconda\envs\py36gpu\lib\site-packages\theano\configdefaults.py in 
try_blas_flag(flags)   1298     res = GCC_compiler.try_compile_tmp(   1299      
   test_code, tmp_prefix='try_blas_',-> 1300         flags=cflags, 
try_run=True)   1301     # res[0]: shows successful compilation   1302     # 
res[1]: shows successful execution
C:\Anaconda\envs\py36gpu\lib\site-packages\theano\gof\cmodule.py in 
try_compile_tmp(src_code, tmp_prefix, flags, try_run, output)   2068         
return Compiler._try_compile_tmp(src_code, tmp_prefix, flags,   2069            
                              try_run, output,-> 2070                           
               theano.config.cxx)   2071    2072     @staticmethod
C:\Anaconda\envs\py36gpu\lib\site-packages\theano\gof\cmodule.py in 
_try_compile_tmp(src_code, tmp_prefix, flags, try_run, output, compiler)   1751 
                err = str(e)   1752             else:-> 1753                 
err += "\n" + str(e)   1754             compilation_ok = False   1755 
TypeError: can't concat str to bytes

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to theano-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to