Categories
Mastering Development

Getting error while trying to run “rasa x”

I have installed rasa x on my computer. rasa shell works well. I can chat within terminal. but when I try to run rasa x I get following error.I am using python 3.6 and tensorflow backend. Starting Rasa X in local mode… Traceback (most recent call last): File “<string>”, line 1, in <module> File […]

Categories
Mastering Development

Counting with Keras

What I’m trying to do I’m currently making a very simple sequence-to-sequence LSTM using Keras with a minor twist, earlier predictions in the sequence should count against the loss less than later ones. The way I’m trying to do this is by counting the sequence number and multiplying by the square root of this count. […]

Categories
Mastering Development

Unable to install html module using pip install html

C:\Users\HP>pip install html Collecting html Using cached html-1.16.tar.gz (7.6 kB) ERROR: Command errored out with exit status 1: command: ‘c:\users\hp\appdata\local\programs\python\python38\python.exe’ -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘”‘”‘C:\\Users\\Public\\Documents\\Wondershare\\CreatorTemp\\pip-install-3h28loxi\\html\\setup.py'”‘”‘; __file__='”‘”‘C:\\Users\\Public\\Documents\\Wondershare\\CreatorTemp\\pip-install-3h28loxi\\html\\setup.py'”‘”‘;f=getattr(tokenize, ‘”‘”‘open'”‘”‘, open)(__file__);code=f.read().replace(‘”‘”‘\r\n'”‘”‘, ‘”‘”‘\n'”‘”‘);f.close();exec(compile(code, __file__, ‘”‘”‘exec'”‘”‘))’ egg_info –egg-base ‘C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-3h28loxi\html\pip-egg-info’ cwd: C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-3h28loxi\html\ Complete output (15 lines): Traceback (most recent call last): File “<string>”, line 1, in <module> File […]

Categories
Development

Django, Materialize, Django-tables2: Expected table or queryset, not str

I have a form and one of the fields is a MultipleChoiceField. The form is rendered in a modal using Materialize. I had issues to render the choices in the form but found this answer I changed the field to: comp = forms.MultipleChoiceField(choices=COMP, widget=forms.Select(choices=COMP, attrs={‘class’: ‘browser-default’})) which solved the rendering issue. Once I submit the […]

Categories
Development

Unclear errors when trying to save data while overriding default ‘create’ method

Tried to write custom create method for my model, but run into some unclear errors. Here is my code: # models.py: class ItemModel(models.Model): item_id = models.CharField(max_length=10, primary_key=True) name = models.CharField(max_length=40) active = models.BooleanField(default=True) def __str__(self): return self.item_id class ItemVersion(models.Model): item_ver_id = models.CharField(max_length=13, primary_key=True) item_ver = models.TextField() config = models.TextField() model = models.ForeignKey(ItemModel, on_delete=models.CASCADE, default=0) session_id […]

Categories
Development

Django CMS Programming error appear while migrating

Encountering this error while running migrate command. Running this project in Divio using Docker. manage.py migrate test_plugin_app /app/addons/aldryn-django/aldryn_config.py:131: RuntimeWarning: no cache configured. Falling back to CACHE_URL=locmem:// RuntimeWarning, System check identified some issues: Operations to perform: Apply all migrations: test_plugin_app Running migrations: Applying test_plugin_app.0001_initial…Traceback (most recent call last): File “/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py”, line 64, in execute return self.cursor.execute(sql, […]

Categories
Development

Django – Import Export – MultiValueDictKeyError at /upload/

Im using django import-export module and Im following this documentation: https://simpleisbetterthancomplex.com/packages/2016/08/11/django-import-export.html#importing-data I want to create an upload-page where the user can upload multiple files. This is how far I got: def upload_data(request): if request.method == ‘POST’: wo_resource = WorkordersResource() pl_resource = PlantResource() se_resource = SeriesResource() re_resource = ResourcesResource() rd_resource = ResourceDemandsResource() dataset = Dataset() wo_data […]

Categories
Development

Django TypeError: sequence item 0: expected str instance, NoneType found

I tried sending email through smtp and email.mime with Django. I have decided not to use the django email because I want to automate sending of emails to several other emails from any user so the user will be required to put in his email and password to his gmail so smtp can send emails […]

Categories
Development

TypeError: List of Tensors when single Tensor expected when using tf.reshape()

I’m getting a “TypeError: List of Tensors when single Tensor expected” when trying to use tf.reshape() after using tf.transpose in Tensorflow. My data is just a list of numbers in a 1D array: [[3,0,5.6,5], [0,0,4.566,8], [1,4,6.544,0]] Input place holder shape is: Tensor(“Placeholders/Placeholder:0”, shape=(?, 22000, 1), dtype=float32) After using tf.transpose it’s: x= tf.transpose(input_dims,[1,0,2]) Tensor(“transpose:0”, shape=(22000, ?, […]

Categories
Development

Rotate selfie image working in development but not working when saving to S3 bucket in production?

I’m trying to fix an image rotation error that I’m getting in production, but not getting in development. Been stuck on this for a few days and would really appreciate any help from anyone who has any insight into how to solve this! ==Context== I’m writing a Django web app with a profile pic upload […]