OSError: [Errno 36] File name too long: while deploying bot on heroku - bots

While deploying this repo on heroku I'm getting error as I mentioned below:
app[worker.1]: OSError: [Errno 36] File name too long: 'filename'
May be getting error because of outdated version of pyrogram ?

Related

urllib [Errno 11001] getaddrinfo failed with windows proxy

I'm running Django 3.2 with django-tenants on a Windows local dev environment.
In my windows hosts file I have:
127.0.0.1 *.localhost
...so that I am able to use subdomains with django-tenants. E.g. http://mysub.localhost:8000.
When running ./manage.py runserver the dev server runs perfectly. However, when trying to execute urlopen in my code I get an error:
>>> html = urlopen('http://mysub.localhost:8000')
Traceback (most recent call last):
[...]
urllib.error.URLError: <urlopen error [Errno 11001] getaddrinfo failed>
As far as I can tell the error is due to the proxy settings on my windows machine (this does not fail in production), but I am unsure how to resolve it?

MLFLOW: Registering a model remotely doesn't work while running locally inside azure VM does

I have been having issues trying to connect to an MLFLOW I created on an azure VM using the following tutorial:
https://medium.com/swlh/how-to-setup-mlflow-on-azure-5ba67c178e7d
Whenever running the following script on the server it works fine, but when running the same script remotely I get an error.
Is there anyone around here that has experience in deploying mlflow to Azure?
the script (censored IP address intentionally):
from sklearn.ensemble import RandomForestRegressor
import mlflow
import mlflow.sklearn
mlflow.set_tracking_uri("http://xx.xxx.xx.xxx:5000/")
mlflow.set_registry_uri("http://xx.xxx.xx.xxx:5000/")
mlflow.set_experiment("test experiment4")
with mlflow.start_run(run_name="YOUR_RUN_NAME") as run:
sk_learn_rfr = RandomForestRegressor()
mlflow.sklearn.log_model(sk_model=sk_learn_rfr,artifact_path="sklearn-model_local",registered_model_name="sk-learn-random-forest-reg-model")
error :
File "C:\Users\JasperBusschers\PycharmProjects\mlflow\venv\lib\site-packages\azure\core\pipeline\_base.py", line 103, in send
self._sender.send(request.http_request, **request.context.options),
File "C:\Users\JasperBusschers\PycharmProjects\mlflow\venv\lib\site-packages\azure\storage\blob\_shared\base_client.py", line 333, in send
return self._transport.send(request, **kwargs)
File "C:\Users\JasperBusschers\PycharmProjects\mlflow\venv\lib\site-packages\azure\storage\blob\_shared\base_client.py", line 333, in send
return self._transport.send(request, **kwargs)
File "C:\Users\JasperBusschers\PycharmProjects\mlflow\venv\lib\site-packages\azure\core\pipeline\transport\_requests_basic.py", line 361, in send
raise error
azure.core.exceptions.ServiceRequestError: <urllib3.connection.HTTPSConnection object at 0x000002B063025AC0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed
I also tried using socket to try to connect and experienced the same error:
import socket
s = socket.socket()
s.connect(('http://20.XXX.XX.XXX', 5000))
Traceback (most recent call last):
File "<input>", line 4, in <module>
socket.gaierror: [Errno 11001] getaddrinfo failed

Exception: OSError: [Errno 8] Exec format error: './kubectl' when publish to Azure Function App

I'm trying to write an API and publish and run on Azure Function app. And in the function I need to read from kubectl.
Reading kubectl and configuration works fine on localhost.
But when I publish to azure function app, it returns me error message: "Exception: OSError: [Errno 8] Exec format error: './kubectl'".
I'm creating an HTTP triggered function in Azure using Python on a mac device. And the Azure service plan is LinusDynamicPlan. The kubectl I'm using is a mac binary.
Code to read kubectl :
deployments = subprocess.check_output(["./kubectl", "get", "deployments", cluster_config_name])
I can successfully run the script on localhost. But not in Azure function app.
The error message I get in Azure:
2019-07-09T07:37:38.168 [Error] Executed 'Functions.nc6v3_usage' (Failed, Id=71d76d36-95ab-4bd6-9656-5578141c4c3f)
Result: Failure
Exception: OSError: [Errno 8] Exec format error: './kubectl'
Stack: File "/usr/local/lib/python3.6/site-packages/azure/functions_worker/dispatcher.py", line 300, in _handle__invocation_request
self.__run_sync_func, invocation_id, fi.func, args)
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/site-packages/azure/functions_worker/dispatcher.py", line 389, in __run_sync_func
return func(**params)
File "/home/site/wwwroot/nc6v3_usage/__init__.py", line 18, in main
deployments = subprocess.check_output(["./kubectl", "get", "deployments", cluster_config_name])
File "/usr/local/lib/python3.6/subprocess.py", line 356, in check_output
**kwargs).stdout
File "/usr/local/lib/python3.6/subprocess.py", line 423, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/local/lib/python3.6/subprocess.py", line 729, in __init__
restore_signals, start_new_session)
File "/usr/local/lib/python3.6/subprocess.py", line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
The kubectl I'm using is a mac binary.
Please correct me if I didn't understand you properly. Are you using mac binary on a Linux system in your Azure instance ? If so, you just cannot do it, Mac =/= Linux.
Try to install kubectl on your Azure instance following this instruction provided by official Kubernetes docummentation and then provide the full path to kubectl binary installed for your system to your script. If you follow the above instruction it will be /usr/local/bin/kubectl.

OSError: [Errno 2] No such file or directory, in_execute_child raise child_exception

I am new to Python and Linux, I am getting an error
File "usr/lib/python2.7/subprocess.py, line 1335, in_execute_child
=======
raise child_exception"
=======
OSERROR: [Error 2] No Such File or Directory
=======
This image shows the commands and error that I am facing:

Memsql deploys clusters on multiple hosts that cannot be installed and memsql_id files are missing

error:
Failed to install MemSQL: Could not retrieve MemSQL ID: [Errno 2] No such file or directory: '/var/lib/memsql/leaf-3306-1/data/memsql_id'
I would appreciate it if you could work it out

Resources