janekg89 / flutype_webapp

FluTypeDB
https://www.flutype.de
GNU Lesser General Public License v3.0
1 stars 1 forks source link

Error when uploading master in clean database #163

Closed matthiaskoenig closed 6 years ago

matthiaskoenig commented 6 years ago
*** Creating Measurement <2018_01_24_slide_15>***
Traceback (most recent call last):
  File "flutype/data_management/fill_database.py", line 77, in <module>
    DatabaseDJ(ma).update_db()
  File "flutype/data_management/fill_database.py", line 63, in update_db
    self.update_studies(studies)
  File "flutype/data_management/fill_database.py", line 42, in update_studies
    Study.objects.get_or_create(**study_dics[study_sid])
  File "/home/mkoenig/git/flutype_webapp/flutype/managers.py", line 136, in get_or_create
    _, _ = RawSpotCollection.objects.get_or_create(**measurement_dic)
  File "/home/mkoenig/git/flutype_webapp/flutype/managers.py", line 182, in get_or_create
    kwargs["raw_spots"] = get_or_create_raw_spots(**kwargs)
  File "/home/mkoenig/git/flutype_webapp/flutype/helper.py", line 279, in get_or_create_raw_spots
    spots["lig_fix_batch"]= spots["lig_fix_batch"].apply(lambda x: x if x == None else LigandBatch.objects.get_subclass(sid=x))
  File "/home/mkoenig/envs/flutype_webapp/lib/python3.5/site-packages/pandas/core/series.py", line 2551, in apply
    mapped = lib.map_infer(values, f, convert=convert_dtype)
  File "pandas/_libs/src/inference.pyx", line 1521, in pandas._libs.lib.map_infer
  File "/home/mkoenig/git/flutype_webapp/flutype/helper.py", line 279, in <lambda>
    spots["lig_fix_batch"]= spots["lig_fix_batch"].apply(lambda x: x if x == None else LigandBatch.objects.get_subclass(sid=x))
  File "/home/mkoenig/envs/flutype_webapp/lib/python3.5/site-packages/model_utils/managers.py", line 259, in get_subclass
    return self.get_queryset().get_subclass(*args, **kwargs)
  File "/home/mkoenig/envs/flutype_webapp/lib/python3.5/site-packages/model_utils/managers.py", line 231, in get_subclass
    return self.select_subclasses().get(*args, **kwargs)
  File "/home/mkoenig/envs/flutype_webapp/lib/python3.5/site-packages/django/db/models/query.py", line 380, in get
    self.model._meta.object_name
flutype.models.DoesNotExist: LigandBatch matching query does not exist.
(flutype_webapp) mkoenig@prime1:~/git/flutype_webapp$ 
matthiaskoenig commented 6 years ago

I did a completely clean install in clean virtualenv with clean database. My dependencies are

Package              Version  
-------------------- ---------
certifi              2018.4.16
chardet              3.0.4    
coverage             4.0.3    
cycler               0.10.0   
decorator            4.3.0    
Django               1.11.13  
django-appconf       1.0.2    
django-choices       1.6.0    
django-dbbackup      3.2.0    
django-debug-toolbar 1.9.1    
django-guardian      1.4.9    
django-imagekit      4.0.2    
django-measurement   3.0.0    
django-model-utils   3.1.1    
django-pandas        0.5.1    
django-polymorphic   1.3.1    
djangorestframework  3.8.2    
gunicorn             19.8.1   
idna                 2.6      
ipython-genutils     0.2.0    
Jinja2               2.10     
jsonschema           2.6.0    
jupyter-core         4.4.0    
kiwisolver           1.0.1    
lml                  0.0.1    
MarkupSafe           1.0      
matplotlib           2.2.2    
measurement          2.0.1    
mpmath               1.0.0    
nbformat             4.4.0    
numpy                1.14.3   
odfpy                1.3.6    
olefile              0.45.1   
opencv-python        3.4.0.12 
pandas               0.22.0   
pathlib              1.0.1    
pilkit               2.0      
Pillow               4.1.1    
pip                  10.0.1   
plotly               2.5.1    
psycopg2             2.7.4    
pyexcel              0.5.8    
pyexcel-io           0.5.7    
pyexcel-ods          0.5.2    
pyparsing            2.2.0    
python-coveralls     2.9.1    
python-dateutil      2.7.2    
pytz                 2018.4   
PyYAML               3.12     
requests             2.18.4   
selenium             2.53.6   
setuptools           39.1.0   
six                  1.11.0   
sqlparse             0.2.4    
sympy                1.1.1    
texttable            1.2.1    
traitlets            4.3.2    
urllib3              1.22     
wheel                0.31.0   
Willow               1.1  
matthiaskoenig commented 6 years ago

I bumped the dependencies. You should try if you can reproduce the error in a clean virtualenv.

matthiaskoenig commented 6 years ago

With the dropbox folder I get the following error

home/mkoenig/envs/flutype_webapp/lib/python3.5/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
  """)
Traceback (most recent call last):
  File "flutype/data_management/fill_database.py", line 77, in <module>
    DatabaseDJ(ma).update_db()
  File "flutype/data_management/fill_database.py", line 62, in update_db
    studies = self.ma.read_studies()
  File "/home/mkoenig/git/flutype_webapp/flutype/data_management/master.py", line 104, in read_studies
    dic_studies[study] = Study(study_path).read()
  File "/home/mkoenig/git/flutype_webapp/flutype/data_management/master.py", line 146, in __init__
    Base.__init__(self,path)
  File "/home/mkoenig/git/flutype_webapp/flutype/data_management/master.py", line 121, in __init__
    self.meta = read_tsv_diconary(self.path_meta)
  File "/home/mkoenig/git/flutype_webapp/flutype/helper.py", line 134, in read_tsv_diconary
    with open(fpath, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/mkoenig/Downloads/flutype/master_2018_04_27/studies/bindungsmuster_2017_07_25/meta.tsv'
matthiaskoenig commented 6 years ago

Some files were missing in master folder. Now working with latest version