How to combine multiple assert_that in Hamcrest?

I'm using PyHamcrest but I think this question is language agnostic. I would like to turn: assert_that(actual0, matcher0) assert_that(actual1, matcher1) into a single assert so that if both...

Python cannot be push to Heroku

I try to deploy a Django app to Heroku and the push get rejected. The result shows that : Push rejected, failed to compile Python app. From the error script, it seems that the model "ConfigParser'...

Trouble installing scrapy ("Segmentation fault (core dumped)")

I'm having issues installing scrapy with and without the sudo command. scrapy -V continues to return "command not found." Does anyone recognize this error? I'm using Lubuntu 18.04, Python...

Conda takes 20+ minutes to solve environment when package is already installed

NOTE: I'm duplicating this post because the question has been up on the conda github page for ~6-days with no response. The original link is...

How to authorize django-rest-knox login path without 401 error?

I'm trying to put an authentication api on my django app so I can start using a Vue+Node frontend. I've read over the knox documentation, but I don't seem to see anything suggesting what the...

Spyder 2.2.5 is giving "You should import from qtconsole instead.", ShimWarning

my issue, spyder 2.2.5 stopped running any code. first of all, I have wanted to install ipywidgets but I can't because of python 2.7.6. I updated python 2.7.6 to 2.7.12, then installed ...

GalenRemoteWebDriver can't connect to localhost server

Currently I am working with galen framework for Python. I am using Python 2.7, Ubuntu 18.04 inside Virtual machine and galenpy. When I run my unittests I am getting an error like below MainThread...

django.core.exceptions.ImproperlyConfigured: Cannot import ASGI_APPLICATION module 'project.routing'

I have installed django channels and I have added routing.py in project root folder and added the line ASGI_APPLICATION = 'project.routing.application' but whenever i tried to run the server i...

Trying to import docx in Python

Fair Warning: I am extremely new to python, so please excuse any dumb mistakes I make =) I would like to be able to open/close/manipulate/read Word documents (docx files) on my Mac using Python....

Installation of twisted in virtualenv

I am trying to install Twisted inside virtualenv: mkvirtualenv --python=/usr/bin/python3 venv_stack Running virtualenv with interpreter /usr/bin/python3 Using base prefix '/usr' New python...

Segmentation fault with tensorboard 1.14

I am using deeplab network. I think it is using tensorflow 1.14 since there are still packages of slim, which is removed from tensorflow 2.0. The python version is always Python 3.6.8 in my...

pyhamcrest - Compare two list

I've just started learning python. Currently writing a unit test to assert if the elements in the expected list is present in the actual list def test_compare_list_of_items(): ...

Deployment of Django Channels App in Google Cloud Platform

I am working on my first django channels app and I want to deploy my django channel app in Google Cloud Platform,its working fine in local server,but when I deployed it on Google Cloud Platform,it...

Why is channel layer not communicating with Redis in my django project?

Goodday everyone, I am new to channels and Redis and i tried to follow the this part of the channels documentation, which says; Let’s make sure that the channel layer can communicate with Redis....

Error creating universal sentence encoder embeddings using beam & tf transform

I have a simple beam pipline that takes some text and gets embeddings using universal sentence encoder with tf transform. Very similar to the demo made using tf 1. import tensorflow as tf import...

Why doesn't the rasa nlu recognize that tensorflow is installed?

I'm using the rasa nlu with the supervised_embedding pipeline, and I am trying to train my models. On my local machine, I can train without any issues. When I try to train the models on my server,...

conda update InvalidSpecError

I am trying to update a conda environment: conda update --all but get the following Fetching package metadata ............. InvalidSpecError: Invalid spec: =20190808 output of conda list is as...

Failed Google App Engine deployment. No matching distribution found for pywin32==xxx

I have run gcloud app deploy for my Django application, but it fails with the following errors at the end of the build log: Step #1 - "builder": Collecting pywin32==227 (from -r requirements.txt...

TensorFlow -- Duplicate plugins for name projector -- Anaconda Prompt

I am trying to run a generic analysis of mnist, as shown below. from __future__ import absolute_import from __future__ import division from __future__ import print_function import math import...

Heroku - can't see application

Edit: Problem solved. i've created a basic app, using python and flask. i've deployed the app to heroku and heroku didn't raise any exceptions or errrors. But when i open my app i getting...

Google cloud function error with wheels & pywin32

I'm trying to deploy a script on google cloud functions for the first time. I went through the documentation and figured out the basics. Then, I started trying to deploy my actual script. I'm...

Error Installing Pyarrow with Python 3.7.4

I'm developing a python script to deploy an Azure Function App. For this reason I can't use another Python version to make this easier. In azure portal I get this error: Azure Function app pyarrow...

CondaEnvException: Pip failed. I am getting a pip subprocess error when trying to create an environment in conda using a .yml file

I am trying to create an environment in conda using a .yml file. Here are the commands i have run, git clone https://github.com/fastai/fastai cd fastai conda env create -f environment.yml The...

unable to install scrapy using pip on my windows 10 64 bit

This is what i get on cmd when i tried to pip install scrapy...i could'nt put the full code in due to char limits. This is on a windows 10 64 bit pc..kindly help. please help me deal with this...

aioredis.errors.ReplyError: ERR unknown command 'BZPOPMIN' When trying to use redis

I have redis 5.4. and I am gettign this error: aioredis.errors.ReplyError: ERR unknown command 'BZPOPMIN' I am following the tutorial on the django-channels website. This is the consumer...

Cannot get Python3 to recognize installed modules

I have scoured across StackOverflow and Google and have not been able to find a solution. I'm currently running the macOS Big Sur beta and I have Python 3.8.5 installed via homebrew. I have pip3...

Docker Error: Service 'web' failed to build : The command '/bin/sh -c pip instal l-r requirements.txt'

Hi I prepared an app and want to deploy it. As I learned Docker should be an easy tool to accomplish this but I spent so much time to create a Docker image. Tried many thing but still...

Ansible ansible.builtin.url module "Name does not resolve" error

I am trying to use the ansible.builtin.url module to fetch the contents of a remote file on my remote server. I am using one of the examples in the official documentation page of the module, but...

How to create a requirements.txt file in Django project?

I have been trying to create a requirements.txt file from the Pycharm terminal but it is adding all unnecessary packages as well. What should I do to show only used...

Install Scrapy on Windows Server 2019, running in a Docker container

I want to install Scrapy on Windows Server 2019, running in a Docker container (please see here and here for the history of my installation). On my local Windows 10 machine I can run my Scrapy...