File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 1+ requently-Asked Questions
2+ ==========================
3+
4+ My script works when launched as ``python3 script.py `` but exits immediately or throws an error when launched from Brickman or as ``./script.py ``
5+ -----
6+
7+ This may occur if your file includes Windows-style line endings, which are often
8+ inserted by editors on Windows. To resolve this issue, open an SSH session and
9+ run the following command, replacing ``<file> `` with the name of the Python file
10+ you're using:
11+
12+ .. code :: shell
13+
14+ sed -i ' s/\r//g' < file>
15+
16+ This will fix it for the copy of the file on the brick, but if you plan to edit
17+ it again from Windows you should configure your editor to use Unix-style endings.
18+ For PyCharm, you can find a guide on doing this `here <https://www.jetbrains.com/help/pycharm/2016.2/configuring-line-separators.html >`_.
19+ Most other editors have similar options; there may be an option for it in the
20+ status bar at the bottom of the window or in the menu bar at the top.
Original file line number Diff line number Diff line change 1212
1313 spec
1414 rpyc
15+ faq
1516
1617Indices and tables
1718==================
You can’t perform that action at this time.
0 commit comments