Questions tagged [pycharm]

PyCharm stands out as a powerful integrated development environment designed specifically for Python programming. Created by JetBrains, this IDE is compatible with Windows, Mac OS X, and Linux operating systems. Please refrain from using this tag for questions related to PyCharm usage but rather use the appropriate [python] language tag.

PyCharm 2022 is facing difficulties in establishing a connection with the Docker service, as it seems unable to locate

I recently upgraded to PyCharm 2022 and I'm having trouble configuring a Docker Python interpreter. Despite the fact that the remote Docker service is up and running (and I have a pro license), PyCharm seems unable to locate it: Loaded: loaded (/lib/syste ...

What steps are needed to set up PyCharm for running py.test tests?

As I embark on the journey of writing unit tests for my Python code, I have decided to go with the py.test framework instead of Python's bundled unittest. After adding a "tests" directory to my project and including test_sample.py in it, my next step ...

Exploring the structural blueprint of your code

On weekends, I dedicate my time to working on a personal coding project that has become quite complex over time. The project involves sequences of functions that manipulate input data stored in class objects before producing an output. Due to the breaks ...

Here are the steps to resolve the error message: "selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element"

I am currently in the process of learning Selenium. My focus is on creating a script that can add multiple items to a shopping cart. Interestingly, when I removed the class from my script, it allowed me to successfully add an item to the cart. However, on ...

How can I obtain a standard Python REPL through JetBrains?

I'm currently working on a project to simplify a classic drinking song using Python, but I'm encountering some odd behavior from the interpreter. My code looks like this: def lines(): bottles = 99 while bottles > 0: yield str ...

Pycharm's auto complete feature does not support the selenium package

After successfully installing selenium through Python pip and creating a functional file named crawlTest.py, everything was running smoothly. However, upon trying to utilize Pycharm for auto-completion of methods from selenium, I encountered issues. It se ...

Utilize Tensorflow with GPU in Pycharm

I am seeking to set up Tensorflow GPU in Pycharm on my Windows 10 system with CUDA v11.1 and cuDNN v8.0.4. While exploring various resources, I came across guides like the ones listed below: Installation Guide 1 How to run Tensorflow GPU in Pycharm? To ...

Executing two pytest tests, where one is expected to be successful and the other to fail

I've been given an assignment that requires me to create a pytest test with specific criteria: · The first test should PASS if the string " Right-click in the box below to see one called 'the-internet' " is found on the page. · ...

When PyCharm is not in debug mode, it runs smoothly without any issues, but as soon as debug

UPDATE: After reverting back to PyCharm version 2017.2.4, the script started working again. It seems that the issue was with the IDE and not the script itself. Recently, my script has been running smoothly until today. Strangely, it only runs without any ...

Is it expected behavior for PyCharm to be unable to refactor a Python enum member decorated with @unique?

PyCharm 2022.3.1, Build #PY-223.8214.51, assembled on December 20, 2022 Python 3.10.6 When an enum is marked with the @unique decorator and is defined in a separate file, PyCharm seems to have difficulty finding usages for refactoring or renaming. It als ...

Creating Python API documentation in PyCharm automatically

My Python project is in PyCharm and I am looking to automate the generation of API documentation (in HTML format) from my Python code and docstrings. On a resource page, it lists out several tools that can be used to generate Python API documentation: a ...

Issue with code execution error in Pycharm when running Python

I am currently using Pycharm Professional version 2019.03 for running a Python code that streams Twitter data. Unfortunately, the code execution fails with the following error message: Traceback (most recent call last): File "C:/Users/HP/PycharmProje ...

Having trouble installing librosa on a Windows system

I encountered an issue while trying to install librosa on PyCharm for Windows. The error message I received was: ERROR: Could not build wheels for soxr, which is necessary for installing pyproject.toml-based projects I attempted all three of the followin ...

Unlocking the power of PyCharm through PYTHONPATH

My go-to directory for the PYTHONPATH is located at c: estmyscripts. Within this directory, I have a few modules that I regularly import and use without any issues in my Python shell. Could someone guide me on how to include this directory path in PyC ...

The Django package does not contain a 'model' attribute. The reference to the 'module' is unresolved

While developing a Realtime chat app with Python, Django, and PyCharm, I encountered an error that says "Unresolved reference 'models'". ...

Modify Pycharm key bindings for Emacs to utilize an alternative word delimiter

When I'm at work, I'm limited to using basic vi/emacs for a variety of reasons. Since I prefer emacs, I make sure to set my IDEs with emacs key bindings when I use heavier tools like Pycharm in my free time at home. I've noticed that most o ...

Issue with graphviz software, encountering ExecutableNotFound error

Having trouble installing graphviz in PyCharm on my Windows system. I've already added the graphviz library to my PyCharm project, but I keep getting an error when trying to execute dot.render: graphviz.backend.execute.ExecutableNotFound: failed to execut ...

determining the position of the substring located within an "if any" function

I have two lists A and B. My goal is to extract a string from list A, find a matching string in list B, and then determine the index of that matching string in list B. I've attempted several nested loops without success. I haven't come across any examples ...

Python Google API client: Issues with log level and debug level functionality not functioning as expected

During the creation of a simple Python app on AppEngine, I came across this helpful page: https://developers.google.com/api-client-library/python/guide/logging The page suggests using the following code to set the log level: import logging logger = logg ...

I'm having trouble getting Pycharm to locate my static files

My Pycharm is having trouble locating my CSS files. I've attached a screenshot showing the settings.py file, the directory where the .css file is located, and the error message from the terminal indicating a 404 error. Could someone please help me identify ...

Find a particular item by referencing a different element

I am attempting to save an element into a string variable, however, in order to locate the desired element I require another element that meets specific conditions. The reason for not directly accessing the intended element is due to the presence of multip ...

How can I inform PyCharm that a class instance should be treated as an integer using the __index__ method when it is passed as an argument to the range() function

Here's an interesting coding scenario to consider: import random class MyClass: def __index__(self): return random.randint(-100, 100) m = MyClass() print(range(m, m, m)) Although the code runs without any issues and displays something lik ...

Having trouble installing the Binance API in PyCharm

Having some trouble installing the python-binance api on PyCharm. When I try running python -m pip install python-binance in the terminal, I encounter an error message that says: Python was not found; run without arguments to install from the Microsoft St ...

What steps should I follow to activate the Terminal plugin on Pycharm Edu version 3.5.1?

On a recent visit to JetBrains, the recommendation was to enable the Terminal plugin in Pycharm. However, I am unable to locate it anywhere within my application. This has become quite problematic as I urgently need access to the Terminal for an ongoing ...

Problem importing Selenium module, any ideas?

I am currently diving into learning RobotFramework as a complete beginner. My background includes crafting automation scripts with ruby-watir and gherkin, along with dabbling in c# automation. However, I'm facing a roadblock when it comes to setting ...

Every time I try to run my scripts on PyCharm using Jenkins, I keep receiving a notification to

While attempting to execute automated tests on the cloud version of Jenkins, I encountered the following error: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-0739wibs/cryptograph ...

I'm receiving an error message stating that the file cannot be loaded due to disabled script execution on this system. Can you

Currently facing an issue while loading a python file in PyCharm. There is a warning popping up which wasn't there before. Interestingly, print('Hello') function is working fine but I am encountering difficulties in installing Django. Encountered a warni ...

Having difficulty creating lists within lists

Currently, I am working on building a straightforward quiz program using Python in Pycharm. However, I'm facing some difficulties when attempting to create a nested list within this program. question = ["1. Grand Central Terminal, Park Avenue, New Yor ...

ERROR: Cannot call the LIST object

https://i.stack.imgur.com/jOSgE.png Can someone assist me in resolving this issue with my code: "I'm getting an error message saying 'TypeError: 'list' object is not callable'" ...

What causes confusion in Python when dealing with thread arguments?

I created a basic thread program: import threading Initializing threads class OpenThread (threading.Thread): def __init__(self, threadID): threading.Thread.__init__(self) self.threadID = threadID def run(self): prin ...

What are some methods for increasing the speed of debugging in Python + Django + PyCharm on a Windows operating system

Enhancing Django Debugging with PyCharm. Every time I try to debug something, the process runs terribly slow. The start-up time for Django is excessively long. Let me clarify - I am a big fan of PyCharm for its comprehensive debugging features...and Pyt ...

Steps for generating a dictionary from a CSV file

I have a file stored in csv format with the following structure: #ID #Number #Date #Name #Email 1978 26 24/4/10 Jim <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="89c3e0e4c9fbe8e7ede6e4ece4e8e0e5a7eae6e4">[email pro ...

Cannot locate module in PyCharm on Windows

After successfully installing Pytorch through Anaconda, I encountered an issue where PyCharm was unable to find the module. ModuleNotFoundError: No module named 'torch' In addition, I have CUDA installed, but when attempting to add the package with PyC ...

Error message "npm: not found" was encountered while attempting to generate a React app using tools like NVM and NPM within

I'm currently working on setting up a new React project in pycharm. Utilizing version 0.34.0 of NVM, I have successfully installed node. Before initiating the project, here is my pycharm window: https://i.stack.imgur.com/Opt7z.png The command npm -v ret ...

PyCharm's capability for offering type hints is limited when it comes to dealing with overloaded operators

This issue was briefly mentioned in this discussion, but unfortunately, no resolution was provided. My vector class is defined as follows: class Vector2D(object): # ... def __add__(self, other): return Vector2D(self.x + other.x, self.y ...

Pycharm SASS: generate CSS files in a designated subdirectory

After successfully setting up a file watcher in PyCharm for my SASS files following the official guide, I am now looking to customize the destination of the compiled CSS files. Ideally, I want the output directory to be located in a specific folder relativ ...

I encountered an issue with Robot framework where it was unable to retrieve the locator. Despite attempting to copy the xpath, I continued to receive the error message stating "unable to find the locator."

Here are the elements I am currently working on automating an application using Robot framework, Selenium in PyCharm tool. As part of this process, I attempted to define a keyword to click on a sidebar entity named "GCC Intelligence", but encountered the ...

The terminal displayed the message "no tests ran," despite the fact that the script executed without any issues

import pytest import openpyxl class test_Read_From_Excel: workbook_object = openpyxl.load_workbook("/Users/kartik.tumu/Desktop/Testing Screen Shots/CBS/Selenium/Test Data.xlsx") print(workbook_object.sheetnames) #object of sheet "s ...

Error: Cannot find module 'selenium.webdriver.common'

Recently, I started learning Python. To practice what I have learned so far, I decided to create a new Python project using PyCharm. However, when I tried running my simple program, I encountered the following error. "C:\D drive\Workspace\P ...

"Access Denied": PyCharm's Struggle with Setting Up an Anaconda Environment

Even after granting PyCharm root permissions, I am still experiencing a "permission denied" error message when trying to create a Conda environment. This issue has persisted despite my initial success in setting up the environment. ...