How to fix UnicodeDecodeError in Django REST Framework?

I want to show ProductImageSerializer in the browsable API. But I got this error: UnicodeDecodeError at /api/product_images/ ‘utf-8’ codec can’t decode byte 0xff in position 0: invalid start byte Unicode error hint The string that could not be encoded/decoded was: ����� Here’s my models.py: class ProductImage(models.Model): product = models.ForeignKey(Product, on_delete=models.CASCADE) image = models.ImageField(upload_to=’product_images’, width_field=None, height_field=None,…

Details

How to add several potentialActions to WebSite in JSON-LD?

I want to add several potentialActions to WebSite in JSON-LD. My current json-ld: <script type=”application/ld+json”> { “@context”:”https:\/\/schema.org”, “type”:”WebSite”, “name”:”my_name”, “url”:”my_url”, “potentialAction”:{ “@type”:”SearchAction”, “target”:”my_url/?q={query}”, “query”:”required” } } </script> I want to add one more potentialAction to WebSite. Is it possible by cloning current json-ld and changing values? Or by changing current json-ld?

Details

How to install Jekyll on Debian

I’m following the “Jekyll on Debian” directions step-by-step for installing Jekyll on my Debian 10.1: sudo apt-get install ruby-full build-essential zlib1g-dev echo ‘# Install Ruby Gems to ~/gems’ >> ~/.bashrc echo ‘export GEM_HOME=”$HOME/gems”‘ >> ~/.bashrc echo ‘export PATH=”$HOME/gems/bin:$PATH”‘ >> ~/.bashrc source ~/.bashrc gem install jekyll bundler but it doesn’t work. Here is the output: $…

Details

Pip can’t find PyPI package in Artifactory

I build the PyPI package and pushed to our on-prem Artifactory by using jfrog CLI and command: tar.gz ./jfrog rt upload –url https://artifacts.XYZ.com/artifactory ‘–props=pypi.name=xyz_easysdlc.traceability_matrix_generator;pypi.version=0.0.1.dev20200102111901+dirty.0.g251f725.mock.develop;pypi.normalized.name=xyz-easysdlc-traceability-matrix-generator’ –module=xyz_easysdlc.traceability_matrix_generator –user=**** ‘–password=****’ dist/xyz_easysdlc.traceability_matrix_generator-0.0.1.dev20200102111901+dirty.0.g251f725.mock.develop.tar.gz pypi-main-dev/xyz_easysdlc.traceability_matrix_generator/0.0.1.dev20200102111901+dirty.0.g251f725.mock.develop/ wheel ./jfrog rt upload –url https://artifacts.xyz.com/artifactory ‘–props=pypi.name=xyz_easysdlc.traceability_matrix_generator;pypi.version=0.0.1.dev20200102111901+dirty.0.g251f725.mock.develop;pypi.normalized.name=xyz-easysdlc-traceability-matrix-generator’ –module=xyz_easysdlc.traceability_matrix_generator –user=**** ‘–password=****’ dist/xyz_easysdlc.traceability_matrix_generator-0.0.1.dev20200102111901+dirty.0.g251f725.mock.develop-py3-none-any.whl pypi-main-dev/xyz_easysdlc.traceability_matrix_generator/0.0.1.dev20200102111901+dirty.0.g251f725.mock.develop/ Both are uploaded successfully. When I’m installing the pip package from .whl file by…

Details

Dell XPS 15 9570 with Ubuntu 19.04 synaptics touchpad problem

There is an article in dell.com about how to fix the touchpad: https://www.dell.com/support/article/ca/en/cabsdt1/sln308258/precision-xps-ubuntu-general-touchpad-mouse-issue-fix?lang=en However it looks like it only works for Ubuntu 16.04. There is not linux-generic-hwe-19.04 published yet. The point from which I could start fixing the touchpad is: sudo gedit /usr/share/x11/xorg.conf.d/*synaptics-quirks.conf But I don have a dirctory /usr/share/x11 in my system. So there…

Details