Categories
Mastering Development

Airflow worker not starting with celery

I’m trying to get started with airflow at AWS. My webserver and scheduler are working fine, but I have a strange error when I start my worker task. As a small summary of my environment: Redis via AWS Elasticache Postgres via AWS RDS Worker | Scheduler | Webserver as ECS containers on EC2 instance In […]

Categories
Mastering Development

How do I preprocess a header file with macros to a non macro header file

C newbie here. My use case is to give a header file posted here to the python library cffi so that I can bind to a C library. The header file in the previous link has macros. cffi only accepts a header file without macros, I think. Is there a way to give a header […]

Categories
Mastering Development

Cannot install pyttsx

When I attempt to install pyttsx3 using pip3 install pyttsx3, I receive the following output: Defaulting to user installation because normal site-packages is not writeable Collecting pyttsx3 Using cached pyttsx3-2.84-py3-none-any.whl (39 kB) Collecting pyobjc>=2.4 Using cached pyobjc-6.1-py3-none-any.whl (2.9 kB) Collecting pyobjc-framework-WebKit==6.1 Using cached pyobjc-framework-WebKit-6.1.tar.gz (444 kB) ERROR: Command errored out with exit status 1: command: […]

Categories
Mastering Development

How to open a requests session?

I am having a hard time in this problem: I have to perform some tasks with requests (it’s mandatory that I use requests for these tasks, so I cannot use all the way selenium in the first place) and then “transfer” the session that I have been carried on (with requests.session() ) to selenium and […]

Categories
Development

How does one fix the VS code debugger if it stopped working and throws a multithreaded/multiprocess error? [closed]

I was running the debugger when it suddenly threw me this error in the VS code terminal: (automl-meta-learning) brandomiranda~/automl-meta-learning ❯ cd /Users/brandomiranda/automl-meta-learning ; env PYTHONIOENCODING=UTF-8 PYTHONUNBUFFERED=1 /Users/brandomiranda/miniconda3/envs/automl-meta-learning/bin/python /Users/brandomiranda/.vscode/extensions/ms-python.python-2020.1.58038/pythonFiles/ptvsd_launcher.py –default –client –host localhost –port 49949 /Users/brandomiranda/automl-meta-learning/automl/automl/meta_optimizers/differentiable_SGD.py –> main in differentiable SGD hello world Files already downloaded and verified Files already downloaded and verified Files already downloaded […]

Categories
Development

Python: import requests gets a lot errors MacOS

New to programming and followed this course: https://www.youtube.com/watch?v=4F2m91eKmts&feature=emb_logo When things went to Webscraping, got errors: Code says: import requests from bs4 import BeautifulSoup page = requests.get(‘https://forecast.weather.gov/MapClick.php?lat=34.05349000000007&lon=-118.24531999999999’) soup = BeautifulSoup(page.content, ‘html.parser’) print(soup.find_all(‘a’)) Return is: File “/Users/…/python/cleverprogrammer/webscraping.py”, line 1, in import requests File “/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests/init.py”, line 112, in from . import utils File “/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests/utils.py”, line 26, in from […]

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

I can’t run programs on python because of this error

When I launch spyder, this error appears : Traceback (most recent call last): File “C:\ProgramData\Anaconda3\lib\site‑packages\spyder\plugins\ipythonconsole.py”, line 1572, in create_kernel_manager_and_kernel_client kernel_manager.start_kernel(stderr=stderr_handle) File “C:\ProgramData\Anaconda3\lib\site‑packages\jupyter_client\manager.py”, line 240, in start_kernel self.write_connection_file() File “C:\ProgramData\Anaconda3\lib\site‑packages\jupyter_client\connect.py”, line 547, in write_connection_file kernel_name=self.kernel_name File “C:\ProgramData\Anaconda3\lib\site‑packages\jupyter_client\connect.py”, line 212, in write_connection_file with secure_write(fname) as f: File “C:\ProgramData\Anaconda3\lib\contextlib.py”, line 112, in __enter__ return next(self.gen) File “C:\ProgramData\Anaconda3\lib\site‑packages\jupyter_client\connect.py”, line […]

Categories
Development

Permission Error: [Errno 1] Operation Not permitted

I am trying to add some .txt files to my code in pyinstaller, but when I do pyinstaller maze.spec, I am getting a permission error. I thought a simple sudo would fix it, but i am still getting the error…. Any Idea on what could be wrong? Here is my error btw Traceback (most recent […]

Categories
Development Python

trouble using python 3 because of kernel error

I just installed anaconda 3 and tried to use Jupyter Notebook for Python 3. However, it did not work because of the kernel error on the top right coner and the error message was Traceback (most recent call last): File “C:\Users\jiyoon\Anaconda3\lib\site-packages\tornado\web.py”, line 1699, in _execute result = await result File “C:\Users\jiyoon\Anaconda3\lib\site-packages\tornado\gen.py”, line 742, in run […]