- Saved searches
- Use saved searches to filter your results more quickly
- «python3»: source_path must be set #27
- «python3»: source_path must be set #27
- Comments
- Не могу запустить скрипты Python из командной строки
- Configure python interpreter with docker compose error "python script path must be set"
- Recent Threads
- Why is it okay for my .bashrc or .zshrc to be writable by my normal user?
- SFTP user login details real-time filtering
- get nat port forwarding IP address
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
«python3»: source_path must be set #27
«python3»: source_path must be set #27
Comments
Could you please give me a hand with this?
I’m running on Alpine 3.10, Python 3.7. It works locally (Ubuntu 20.04, Python3.8) but for some reason fails in CI (alpine) and I’m having hard time figuring out in what direction to dig
Terraform v0.12.24 + provider.aws v2.66.0 + provider.external v1.2.0 + provider.local v1.4.0 + provider.null v2.1.2
Error: failed to execute "python3": source_path must be set. [2020-06-16T12:04:23.320Z] on .terraform/modules/lambda/terraform-aws-lambda-1.5.0/package.tf line 3, in data "external" "archive_prepare": 3: data "external" "archive_prepare"
The text was updated successfully, but these errors were encountered:
Sure, first, make sure that you use latest version of the module where more under-the-hood improvements and bugfixes were made.
Your error message means that source_path is wrong. You can write it like this:
or try to use absolute path.
Also, it should work on Python 3.6 as you mentioned another day 🙂
^ was the first thing I tried. It didn't work so I thought to change it to how it shown in examples but didn't help either. Thus I'm here. Is there anything else to try to debug it?
Have you tried to use an absolute path?
If you would use terragrunt, you should use this hack:
source_path = jsonencode("$/../../src/")
Even if it works it is not usable since the absolute path will be different in CI and locally. But I'm going to give it a try. No plane terraform wrapped into a little bit of shell
You can enable debug as described in README.
export TF_LAMBDA_PACKAGE_LOG_LEVEL=DEBUG2 terraform apply
A little bit of shell. can be related to the bug linked above. Wrap it with jsonencode() .
@antonbabenko weird, but I'm getting the same results as for jsonencode as for absolute path
do I read it right that error message
failed to execute "python3": source_path must be set.
comes from package.py, i.e. it is python script complaining about source_path, not terraform, right?
# Validate the query. if not os.path.exists(source_path): abort('source_path must be set.')
I would suggest changing the message to something that actually describes what is going on - here the program checks that path it got points to something that exists. So a better message would be to display the content of the variable and tell the user that it does not exist. Then user will be able to act on it. Right, now it is somewhat misguiding. Going to experiment with the code a little bit
@antonbabenko 🤦 forgot to commit src; that is why it works locally and not it CI. Kind of obviously. Anyhow, going to send a pull request to improve the message
Nevermind, that code already got changed in the latest version. Then no pull request. Thanks for your help!
PS: No automation = no need to commit anything anywhere = works on my machine 100%
Не могу запустить скрипты Python из командной строки
Винда 10, Python 3.5. Не запускается сценарий script1 для python из командной строки. Сам интерпретатор запускается. При вводе команды python script1 выдает python: can't open file 'script1': [Errno 2] No such file or directory.
При попытке ввести путь к файлу в виде C:\Users\User>python C:\Python35-32\MyScripts\script1 выдает python: can't open file 'C:\Python35-32\MyScripts\script1': [Errno 2] No such file or directory. Хотя сам файл лежит именно по этому адресу (смотрите скрин).
Переместил файл скрипта в корневую папку Python, все равно не запускается:
C:\Users\User>python script1
python: can't open file 'script1': [Errno 2] No such file or directory
В Path адрес прописан. Как корневой папки, так и папки со скриптами:
C:\Program Files\ActiveState Komodo Edit 9\;C:\Python35-32\Scripts\;C:\Python35-32\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Python35-32\MyScripts\;
Строго не судите, пжста. Раньше не имел дела ни с программированием, ни с командной строкой.
Тут лучшеб переменные окружения настроил. Если питон для себя настроил то перейди в папку со скриптом и там запусти. Или проще полный путь к питону и там полный путь к скрипту
Включите отображение расширения файлов (погуглите как это сделать). Скорее всего там расширение .py, т. е. полное имя пути будет script1.py Попробуйте теперь запустить как
python script1.py
Смотрю, за 5 лет никто так и не написал по-существу. Была та-же проблема. Оказалось - командную строку нужно запускать с правами администратора.
Configure python interpreter with docker compose error "python script path must be set"
Giridhar Asks: Configure python interpreter with docker compose error "python script path must be set"
Python django Project runs on docker-compose and i need to create run/Debug configuration an followed official documentation Configure an interpreter using Docker Compose | PyCharm
Upon clicking run or debug getting error "Python script path must be set"
OS: macOS version 12.4 docker compose: 2.6.1 Pycharm professional
SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.
Recent Threads
Why is it okay for my .bashrc or .zshrc to be writable by my normal user?
Zach Huxford Asks: Why is it okay for my .bashrc or .zshrc to be writable by my normal user?
My user ~/.zshrc file has the following default privileges
My understanding of user permissions is that any process spawned by my user will then have read/write permissions to this file.
In malicious hands this could probably be used to edit aliases or append a directory of the attackers choosing to the beginning of the $PATH. I'm concerned that a malicious program that I install on the user level could then trick me into somehow giving up my sudo password through this method.
Obviously I do trust most of the programs that I install to not be malicious, however, I do use npm as a package manager for my own projects which is commonly accepted to be a vector for malware due to the sheer number of dependencies each module and it's dependencies can have.
I know that running sudo npm install -g is really bad practice but is using npm as a user which has write access to your main shell configuration file almost as bad just with a few extra steps in between, or am I lacking an understanding of how user permissions/shell configuration/npm works?
If this is insecure, then have I somehow missed security good practice for handling node js projects?
SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.
SFTP user login details real-time filtering
Amal P Ramesh Asks: SFTP user login details real-time filtering
I have enabled the SFTP login log into the default logfile /var/log/syslog and tried to filter the login time of each user and insert it into the database.
But the filtering is not worked as I expected.
Jun 23 15:47:03 ip-172-16-0-62 systemd[24938]: Reached target Shutdown. Jun 23 15:47:03 ip-172-16-0-62 systemd[24938]: Starting Exit the Session..c. Jun 23 15:47:03 ip-172-16-0-62 systemd[24938]: Received SIGRTMIN+24 from PID 24980 (kill). Jun 23 15:47:03 ip-172-16-0-62 systemd[1]: Stopped User Manager for UID 1051. Jun 23 15:47:03 ip-172-16-0-62 systemd[1]: Removed slice User Slice of nidasu. Jun 23 15:47:13 ip-172-16-0-62 systemd[1]: Created slice User Slice of ftpuser1. Jun 23 15:47:13 ip-172-16-0-62 systemd[1]: Starting User Manager for UID 1069. Jun 23 15:47:13 ip-172-16-0-62 systemd[1]: Started Session 11907571 of user ftpuser1. Jun 23 15:47:13 ip-172-16-0-62 systemd[24987]: Listening on REST API socket for snapd user session agent. Jun 23 15:47:13 ip-172-16-0-62 systemd[24987]: Reached target Paths. Jun 23 15:47:13 ip-172-16-0-62 systemd[24987]: Reached target Timers. Jun 23 15:47:13 ip-172-16-0-62 systemd[24987]: Reached target Sockets. Jun 23 15:47:13 ip-172-16-0-62 systemd[24987]: Reached target Basic System. Jun 23 15:47:13 ip-172-16-0-62 systemd[24987]: Reached target Default. Jun 23 15:47:13 ip-172-16-0-62 systemd[24987]: Startup finished in 15ms.
Needs to filter user login messages, like:
Jun 23 15:47:13 ip-172-16-0-62 systemd[1]: Started Session 11907571 of user ftpuser1.
I need to grep it out by matching the string "Started Session 11907571 of user ftpuser1 "
The session number 11907571 is a random number and usernames also differ so grepping can ignore the numbers and usernames, only need to check the string like: **"Started Session *** of user ***"
And need to parse the line and grep the date + time , and username then insert it into the MySQL database.
If there is any option to create a daemon process to run and insert the details into DB, it will help me to do the task.
SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.
get nat port forwarding IP address
gyandoo Asks: get nat port forwarding IP address
I am using an android phone that is connected to an openwrt router via usb tether
The android phone has a dynamic wan gateway on each reboot
To make things easy for me to connect to the webui of some of the apps on the android phone via the openwrt router, I created a port forwarding rule in openwrt and entered the wan ip of the android phone manually. port forwarding rule
On each reboot of the android phone, i will have to check the routes in openwrt, get the new wan ip and update the port forwarding rule, which is fine
to make things easier on my linux machine, id like to be able to use CLI to get that wan ip that i set in port forwarding i.e 192.168.1.1:32399
not that it matters, but curlftpfs ftp mounting isn't playing well with nat, all other android app webui's are working fine with the port redirect, curlftpfs requires the wan ip, it finds the wan ip in debug but skips it
SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.