google-dataproc using pyspark.sql import SparkSession keeps crashing with "504. Thats an error" and none of the notebooks open, is there a solution available?
Related
Imma try and be careful, my first question on here got me blocked lol. Testing out my scraping skills on a random church website and I keep getting the error on the title. Can someone see what I'm doing wrong? Updated my CV's, installed like 10 packages(based on some past answers) and still nothing.
import subprocess
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
subprocess.call(['chromedriver_win32.zip'], shell=True)
website = "https://www.bethanyfga.org/"
path = "C:/Users/calde/OneDrive/Desktop/chromedriver_win32.zip"
service = Service(executable_path=path)
driver = webdriver.Chrome(service=service)
driver.get(website)
installed several openCV's, uninstalled and reinstalled other, unrelated, packages. Imported subprocess.
I am trying to run telethon code on google colab plus and leave it running background. The code is running fine and has no errors while that is started and running in the browser tab. When I close the tab and reopened it, It showed too many repeated errors in the output console as below
RuntimeError: cannot enter context: <Context object at 0x7f0063bc04b0> is already entered
Exception in callback BaseAsyncIOLoop._handle_events(18, 1)
handle: <Handle BaseAsyncIOLoop._handle_events(18, 1)>
Traceback (most recent call last):
The code I am running on colab pro plus notebook
from telethon.sync import TelegramClient, events, Button
from telethon.sessions import StringSession
from telethon import functions, types
import asyncio
import nest_asyncio
nest_asyncio.apply()
api_id =
api_hash = ''
session=''
async def main():
async with TelegramClient(StringSession(session), api_id, api_hash) as client:
print("Inside")
#client.on(events.NewMessage(chats=[xxxxxxxxxx]))
async def my_event_handler(event):
print(event.raw_text)
while True:
#doSomething and wait for 0.03 seconds
await asyncio.sleep(0.03)
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
I am unable to understand what caused the error because the errors are only showing up when I closed and reopened the notebook where the code is running
The issue got solved after installing this package
pip install --upgrade ipykernel
Source : https://github.com/jupyter/jupyter_console/issues/163#issuecomment-413468124
Error message in vs code when using jupyter extension connected to remote server using ssh.
Error: Session cannot generate requests
Error: Session cannot generate requests
at w.executeCodeCell (/root/.vscode-server/extensions/ms-toolsai.jupyter-2021.8.1236758218/out/client/extension.js:90:327199)
at w.execute (/root/.vscode-server/extensions/ms-toolsai.jupyter-2021.8.1236758218/out/client/extension.js:90:326520)
at w.start (/root/.vscode-server/extensions/ms-toolsai.jupyter-2021.8.1236758218/out/client/extension.js:90:322336)
at async t.CellExecutionQueue.executeQueuedCells (/root/.vscode-server/extensions/ms-toolsai.jupyter-2021.8.1236758218/out/client/extension.js:90:336863)
at async t.CellExecutionQueue.start (/root/.vscode-server/extensions/ms-toolsai.jupyter-2021.8.1236758218/out/client/extension.js:90:336403)
I got this error after running the code below.
import pandas as pd
from itertools import product
pd.DataFrame(product(item_table, user_table), columns = ['item_id', 'user_id'])
product function outputs all combinations of the given tables.
item_table has 39729 number of items(39729 by 1)
user_table has 251350 users(251350 by 1).
And the above code outputs 251350 x 39729 combination table.
Therefore I guess this is because of the large computation but I want to know the meaning of error messages and want to know how to solve the problem.
I have encountered the same problem (so so).
It happened when I tried to import tensorflow.keras.
I was no longer able to import packages.
I just changed of conda environment, and then got back to the one I was working in and it worked (but trying to import keras still caused the same problem).
Hi I have been running code on my Jupyter-lab notebook instances for a while now and all of a sudden I get this problem along with an additional 504 error message.
The program might execute for a bit (maybe 20 minutes) and then this occurs. Any idea why this is happening?
I have an application built on CherryPy. I've been using the CherryPy built-in HTTP server but now want to move to uWSGI (and nginx).
On my workstation this works fine and the change was simple enough to make.
However on my test server I get the following error.
File "./validator/dbtools.py", line 3, in <module>
import psycopg2
File "/home/apiuser/API25/env/lib64/python3.5/site-packages/psycopg2/__init__.py", line 50, in <module>
from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
ImportError: /home/apiuser/API25/env/lib64/python3.5/site-packages/psycopg2/_psycopg.cpython-35m-x86_64-linux-gnu.so: undefined symbol: lo_truncate64
unable to load app 0 (mountpoint='') (callable not found or import error)
The test server is different (CentOS 7 vs an Ubuntu based distribution on my workstation). When I google the error I see reports from similar errors but in different libraries. The psycopg library didn't change, in fact the two versions of the app (CherryPy / uWSGI version) runs from the same VirtualEnv. Running it as a CherryPy service works still fine.
I'm new to all of this so any help will be appreciated!
EDIT -- In response to the Question by Piotr: I star the app with a small bash script like this:
#!/bin/bash
. env/bin/activate
uwsgi --socket 127.0.0.1:8030 --protocol=http --wsgi-file wsgi.py --callable wsgiapp
Two other things I have picked up:
1. I set up a new test server running CentOs. On this new server the uwsgi app starts without the undefined symbol error. I would still like to know what causes it as a matter of learning about this.
2. Some of the API endpoints include some functions launched into background threads. Those work fine when running the app behind CherryPy's default server. When running the app using uWSGI the background threads doesn't execute but appears to get queued up. When I terminate the app (Control-C on the console) those threads suddenly run and those tasks (particularly push notifications) will go through.