Categories
Mastering Development

Azure DevOps App Service deployment failure

I’m trying to deploy flask app using Azure Pipelines to Azure App Services. I followed some tutorials that ara available here and there but after managing to deploy it on app service when I check Log Stream I get this info about errors: 2020-03-23T21:43:10.491779175Z WARNING: Could not find virtual environment directory /home/site/wwwroot/antenv. 2020-03-23T21:43:10.492608980Z WARNING: Could […]

Categories
Linux Mastering Development

UnicodeDecodeError while installing Fedora workstation 31

I am currently trying to install Fedora 31 alongside Windows 10 on UEFI & GPT system. The steps to reproduce the issue.. Use Fedora Media writer to create a bootable usb drive. Launch Fedora live usb. Try to launch GUI installer, but nothing happens. run /usr/bin/liveinst fails with the following message [liveuser@localhost-live ~]$ /usr/bin/liveinst Traceback […]

Categories
Development Linux Ubuntu

ModuleNotFoundError: No module named ‘pip._vendor.distro’

I have been trying to figure out what is causing this error, but every solution I’ve tried from totally uninstalling python and pip to rm-ing some folder doesn’t work: $ pip3 install -R requirements.txt Traceback (most recent call last): File “/usr/lib/python3/dist-packages/pip/_vendor/__init__.py”, line 33, in vendored __import__(vendored_name, globals(), locals(), level=0) ModuleNotFoundError: No module named ‘pip._vendor.distro’ During […]

Categories
Development System & Network

long_running_recognize() function raises an SSL exception when run in concurrent.futures.ThreadPoolExecutor

I use long_running_recognize from speech_v1p1beta1.SpeechClient(). I’ve encountered some problem when I run long_running_recognize in parallel using concurrent.futures.ThreadPoolExecutor. My error is following: exception calling callback for <Future at 0x7f4ed4443dd8 state=finished raised Error> Traceback (most recent call last): File “/usr/lib/python3.6/concurrent/futures/_base.py”, line 324, in _invoke_callbacks File “/data/venvs/archSpeechRecoVenv/lib/python3.6/site-packages/google/auth/transport/grpc.py”, line 75, in wrapped File “/usr/lib/python3.6/concurrent/futures/_base.py”, line 425, in result File […]

Categories
Development

Python – TypeError: ‘set’ object is not subscriptable [closed]

i am new to python and following a tutorial. I have just installed web.py and it seems to work ok. but when i try to run the script it just gives me an error and I have no clue what its all about. This is the full code in the scrip, works fine on instructor […]

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 Linux

locale timestamp causing overflow when executing python script

I’m trying to run a python script I wrote on my Raspberry Pi Zero, but I keep getting the error OverflowError: timestamp out of range for platform time_t. I’m relatively certain it’s something with the 32-bit ARM architecture of the pi, but I can’t seem to figure out a workaround. Here’s the traceback (mostly for […]

Categories
Development

TypeError: object of type ‘NoneType’ has no len() Python on application deployment

I’m just learning python and I’m trying to run my application but get the following: Traceback (most recent call last): File “/Users/plugins/bluegreen.py”, line 433, in <module> cnames = [bluegreen.get_cname(green), bluegreen.get_cname(blue)] File “/Users/plugins/bluegreen.py”, line 66, in get_cname if len(data.get(“cname”)) == 0: TypeError: object of type ‘NoneType’ has no len() Here are the contents of line 66 […]

Categories
Development

Should I use onboard video to free up my GPU for tensorflow?

I’m running into a lot of memory allocation problems whilst attempting to train a network. I have a GTX 1070 and I’m using conda to set up the environment. Currently my GPU is running my monitor so I’m wondering if using onboard graphics might help with my issues? Additionally, the error logs I was getting […]

Categories
Development Python

Python – index out of range

Trying to adapt a basic profiler for bash scripts, block of code below. Can’t figure out why profiling code with a “if branch” throws exception (for example when running this code with a duplicate file). From what I’ve traced, it somewhere creates an extra index value. My apologies if this is trivial as I’m new […]