Comments (2)
After some digging, I find that commenting these lines in /waves/wcore/views/files.py returns the expected functionality, letting me access all the results files and logs through the web interface again:
assert isinstance(self.object, ExportAbleMixin),' Model object must be Export-able'
self.object.serialize()
These lines seem linked to the ExportAbleMixin class that is imported from /waves/wcore/base.py
class ExportAbleMixin(object):
""" Some models object may be 'exportable' in order to be imported elsewhere in another WAVES app.
Based on Django serializer, because we don't want to select fields to export
"""
def serializer(self, context=None):
""" Each sub class must implement this method to initialize its Serializer"""
raise NotImplementedError('Sub classes must implements this method')
def serialize(self):
""" Import model object serializer, serialize and write data to disk """
from os.path import join
from waves.wcore.settings import waves_settings
import json
file_path = join(waves_settings.DATA_ROOT, self.export_file_name)
with open(file_path, 'w') as fp:
try:
serializer = self.serializer()
data = serializer.to_representation(self)
fp.write(json.dumps(data, indent=2))
return file_path
except Exception as e:
raise ExportError('Error dumping model {} [{}]'.format(self, e))
@property
def export_file_name(self):
""" Create export file name, based on concrete class name"""
return '{}_{}.json'.format(self.__class__.__name__.lower(), str(self.pk))
I have yet to figure out exactly why this is posing a problem, but it would seem the objects (be they text files, csv, tsv, png or .zip. All cases in my pipeline that were broken but now work without these commented lines) can't be serialized, and that was what caused the errors.
In any case, commenting the above lines serves as a fix to this problem.
(probably a temporary fix, as there must be a reason why the objects need to be serialized, and just removing the check might break something else).
from waves-core.
Fixed from 1.6.6
from waves-core.
Related Issues (20)
- File Input samples are visible even when File Input is hidden HOT 2
- Admin and User email notifications fof Errors both go to the same email address HOT 2
- Resolve cryptography warning HOT 1
- Add Travis ci configuration file
- Could not import 'waves.wcore.adaptors.shell.SshShellAdaptor' for WAVES settings 'AttributeError' HOT 3
- Accessing Job Details using the Admin "Jobs" page gives "TypeError vars() argument must have __dict__ attribute" error HOT 2
- Turn Encrypt utils into proper Django field
- Bump code to Python 3.0
- Migrate to Django 3.
- Refactor Services / Submission
- Adapter Class refactoring
- File Input Issues
- Test Coverage improvement
- SGE / Slurm testing
- Prepare migration from previous version
- Integrate modern layout for Back end
- Issue with runner parameters
- Waves-Core deployment HOT 3
- Add Textarea input support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from waves-core.