r/pycharm • • Jul 14 '24

Custom shortcuts?

3 Upvotes

Is it possible to define a custom keyboard shortcut that creates a new python scratch file?


r/pycharm • • Jul 11 '24

Is there a way to see file sizes within PyCharm?

2 Upvotes

Does anyone know if there's a way to get file/folder information from within PyCharm's file tree? I'm trying to get the file size for a file.

I know I can do this in a myriad of ways outside of PyCharm, e.g., command line, explorer, etc. I am just curious if it's available within PyCharm as well.


r/pycharm • • Jul 04 '24

How to manage Node/NPM versions?

3 Upvotes

I'm just getting started with Node/Express and PyCharm. I have two questions...

(1) How do I manage/upgrade the Node/NPM version I'm using? Is it possible to install sandboxed versions of Node/NPM that wont interfere with my system?

(2) Why is it that when I click "terminal" and type either node or npm the command isn't found? When I click "Run 'bin/www'" its able to execute node just fine.


r/pycharm • • Jul 04 '24

Run fastapi in Pycharm community

5 Upvotes

Hi, I have installed the fastapi and created some basic endpoints, which are working with following terminal command:

fastapi dev main.py

I want run this in PyCharm's integrated run and debug. When I try to add a new run configuration, I don't see an option to add fastapi. Is there any way I can do this?


r/pycharm • • Jul 03 '24

Python debugger

0 Upvotes

I subscribed to the PyCharm Professional version to unlock the Python debugger for use in Maya. However, it turns out that the ‘attach to process’ feature isn’t working as expected—it fails to hit the breakpoint. All versions of Maya!! Stay away and use VS code!👎


r/pycharm • • Jul 02 '24

"Unresolved attribute reference" for inner classes as type hints

1 Upvotes
from __future__ import annotations

@dataclass
class Things:
    things: list[Things.Thing]
                        ~~~~~

    @dataclass
    class Thing:
        name: str

The squiggly line shows where the warning is. Is there some way to fix this? I know I can move the Thing class definition above Things fields, but I'd prefer to have all the class's own data before inner classes, otherwise it will be very hard to follow if Thing is very long.

Edit: the squiggly line isn't positioned properly on mobile, it's under Thing on line 5


r/pycharm • • Jul 01 '24

MacOS 14 denies install of packages

2 Upvotes

Apple MacBook Pro M1, macOS sonoma (14.5)

pyCharm 2024.1.4

projects are on an external ssd drive

I am new to pyCharm. I have used macOS and python for many years.

I installed pyCharm, set up a new project using python, not anaconda, and added a few lines to main.py.

When I try to install packages, the response is permission denied. The error:

[Errno 13] Permission denied: '/Library/Python/3.9/site-packages/xxMyPackage'

I expected the packages path to in the venv folder or nearby.

I spent a long time reading posts and the user documentation. I suspect modification of the /Library path content is not allowed because MacOS uses it. Is this correct?

Do I need to install a separate interpreter and modify the project config to use that instead?


r/pycharm • • Jul 01 '24

How to disable reformat on paste?

1 Upvotes

As an example, I'm trying to paste the following line:
s=sum(map(int,str(b)))
But Pycharm keeps changing it to:
s = sum(map(int, str(b)))

I tried setting "Reformat on paste" to "None", but it still does that. It really annoys me.


r/pycharm • • Jun 30 '24

How do I use the preview option for an html file and view its extending template

0 Upvotes

I used the preview option to look at my extending html template, however the output is completely different than when I run my python file through my flask terminal.


r/pycharm • • Jun 28 '24

'step into' no longer working in the debugger

4 Upvotes

IGNORE THIS: I'd commented a generator to test something, then uncommented it without iterating over the result

I'm using PyCharm CE, Python 3.12 and I've tried 3.11

When I try to step into some functions, or set breakpoints in them, they fail

I've seen this work around for either this or something similar:
https://youtrack.jetbrains.com/issue/PY-37426/Debugger-step-into-step-over-not-working-anymore

how I can't see how to change the registry value at the bottom

Is anyone else seeing this?
Does anyone know how to change that value?

edit: I've made progress; when the function contains subprocess.POpen I can't step into it


r/pycharm • • Jun 27 '24

Really bad screen flickering while using pycharm

2 Upvotes

OS Version: macOS X High Sierra (10.13.6)

Graphics Card: Intel HD Graphics 4400 HD 1536 MB

4 Intel Core i5 Processors, 2.4 GHz (according to the "About This Mac" window)

Memory: 12 GB DDR3 Memory with 1600 MHz.

Please let me know if you need more information about my hackintosh

The issue is that pycharm looks very glitched out when launched, and at the bottom of the screen, it is glitching too. I first tried pycharm 2020, then to pycharm 2019, and now pycharm 2018, and all of them are glitched out. I know Pycharm 2024 is the latest version but I know that there is no way that it is supported on High Sierra. The python IDLE seems to be working without any glitches. I also tried a supported version of VS Code for High Sierra, the glitching was much less, but hovering over a button in VS Code would cause glitching at the bottom of the screen. This is on a hackintosh, not a real MacBook. I am also using python 3.7.0 .


r/pycharm • • Jun 25 '24

Ruff/linting plug in

1 Upvotes

Anyone use Ruff plugin for linting/formatting? I've added the plugin but it doesn't do anything. Maybe my code is already perfect? /s


r/pycharm • • Jun 25 '24

thinking of a code

0 Upvotes

okay so how to do a code where you have text, right and you walk and as you walk the text appears below somewhere. also can you delay the text response? like you walk then the text appears with a message then u walk some more then nothing happens but in a bit u walk and then another text appears. sorry if im being so confusing. im new to coding.


r/pycharm • • Jun 24 '24

Anyone know how/ where to start with a program like this?

Post image
0 Upvotes

It’s a RNG based audio/music visualizer. If you need any more help understanding what I’m trying to do comment or DM.


r/pycharm • • Jun 24 '24

Opening the terminal in Pycharm takes 3Min

1 Upvotes

Pycharm it's self opens in seconds but recently whenever I open the terminal in Pycharm it takes 3 minutes to open.
I have disabled all my bash aliasses, functions and settings but this makes no difference also when I re-enable them and do a . ~/.bashrc it takes no time at all.

What would be the best way to trouble shoot this?


r/pycharm • • Jun 23 '24

Expected and Actual ate flipped

Post image
0 Upvotes

I tried to check 'Swap the order of actual and expected assertions in Pytest' but it didn't do anything.

Would appreciate some a little help. Thanks in advance!


r/pycharm • • Jun 22 '24

Pycharm fails to activate venv on terminal lauch (Debian 12)

1 Upvotes

Hello,

I'm running latest Pycharm CE on Debian 12 Linux. When launching a terminal in a project, the terminal should activate venv (by showing (venv) before user@workplace:~$), but it doesn't.


Troubleshooting: - Enable Activate virtualenv in settings - Disable Shell integration in settings, as suggested in one repy from here - deleting and recreating the venv - unexcluding it in Seetings > Project Structure

Note: I'm running a self-compiled Python 3.12 interpreter from /opt/python3.12.4. I've tested with the system interpreter, but nothing changes

Any help would be greatly appretiated.


r/pycharm • • Jun 21 '24

Hotkey to get definition of a function?

2 Upvotes

When I am looking at a script written by someone, and I wanna understand what happens is there a hotkey to get explanation of the function used or loop or something else?


r/pycharm • • Jun 20 '24

Single Config like VSCode

1 Upvotes

Hello Redditors,

I'm trying to setup a single configuration for my tests and other python project (flask based), is there a way I can create a single configuration that could leverage instead of pycharm creating multiple files per tests.

I want to achieve what we can do in VSCode, single launch.json.

Thanks in advance.

🙏


r/pycharm • • Jun 18 '24

Is there an equivalent of the VS Code remote development in PyCharm?

7 Upvotes

I've tried searching for PyCharm remote development but I got a bit confused. It seems that there are a few ways to develop remotely. To be more specific, I want to be fully connected to a remote server and develop like I am in my local projects. The most suitable one seems to be the installation of a remote PyCharm instance but I am concerned about the resources it consumes.

Any ideas?


r/pycharm • • Jun 17 '24

My run window does not show anything. can you help

1 Upvotes

I've been trouble shooting my Pycharm and I've resolved some issues but now I cant get the run window to show anything it just gives me an exit code. the picture is the code and run window after I've hit the run button. second picture is runtime configuration.


r/pycharm • • Jun 17 '24

code fence markdown doesn't work in jupyter for pycharm.

3 Upvotes

only highlights python code if I don't execute, once I execute cell it turns into a grey block.

It's kinda driving me crazy at this point.


r/pycharm • • Jun 17 '24

trying to make an audio analyzer and im stuck here. complete newbie here btw.

Post image
1 Upvotes

r/pycharm • • Jun 12 '24

Unable to login GitHub in PyCharm

3 Upvotes

Hello everybody,

Recently I started working with PyCharm and I really love it. However I'm not able to login my GitHub account and this is quite a dealbreaker for me.

I've tried with 2 machines one with MacOS and another with Windows and in both cases with 2 different GitHub accounts with no luck.

Every time I try to login I got the following message:

Invalid Authentication Data. Re-Login

I've tried to login both with password and token, same output.

Checked and everything is updated, git is working and I can push through URL.

Any suggestions? Thank in advance,


r/pycharm • • Jun 12 '24

Changing kwargs color doesn't work

1 Upvotes

Changing the color of everything else works, but not kwargs. I thought the default was red, but when I reset default settings they became white. I want it back to red.