Questions tagged [pycharm]

A Python Integrated Development Environment (IDE)

Filter by
Sorted by
Tagged with
0 votes
0 answers
34 views

Using qgis-stubs in pycharm

I downloaded and installed qgis-stubs 0.2.0 in QGIS 3.22.3. For development I am using pycharm. How do I use qgis-stubs module in pycharm?
VSR's user avatar
  • 53
1 vote
0 answers
57 views

QGis plugin: problems after updating resources.qrc file with QtDesigner - No module named 'resources_rc'

I'm developing a plugin for QGIS 3.32.3 with Python 3.9, starting from a base created with Plugin Builder 3, but after modifying the resources.qrc file with QtDesigner, the plugin is no longer loaded ...
Wolverine's user avatar
0 votes
1 answer
81 views

Running GRASS GIS from PyCharm

I follow the Working_with_GRASS_without_starting_it_explicitly with GRASS 7.8.8 (2023), but it did not work as intended. The Python line "gs.message" runs, but the line "gs.run_command('...
Pablo Sanhueza's user avatar
0 votes
2 answers
40 views

Use the EucDistance function of ArcPy in PyCharm

I failed to calculate the Euclidean distance with the EucDistance function in the PyCharm. The codes are as follows. import arcpy from arcpy import env from arcpy.sa import * arcpy.env.overwriteOutput ...
zongxu li's user avatar
0 votes
0 answers
65 views

WMS layer can't load - conflict QGIS/PyCharm?

I have been struggling for some days to find a solution. I wrote a script which work pretty well in the QGIS python console. This script is using different layer, SHP and WMS. I am trying to use this ...
Tena's user avatar
  • 1
0 votes
0 answers
48 views

Unable to get ArcGIS Pro utility network, Trace Tool output in PyCharm

I am trying to run Trace Tool in PyCharm using ArcPy and get the traced features in PyCharm but after running the Trace tool in PyCharm I am not getting the traced features details. I am running this ...
Kumar Prince's user avatar
0 votes
0 answers
373 views

DLL Load Failed While Importing arcgisscripting: %1 is not a valid Win32 Application

I am experiencing an issue with loading the arcgisscripting module in Python. I am consistently receiving the error: "DLL load failed while importing arcgisscripting: %1 is not a valid Win32 ...
Etchisketchistan's user avatar
0 votes
1 answer
82 views

Replacing the built-in script editor from QGIS with my own IDE (PyCharm)

I have to do some scripting with pyqgis and would like to do this in my IDE 'PyCharm'. So I have set my python interpreter to the path C:/ProgramFiles/QGIS 3.28.3/bin/python-qgis.bat, so I can use the ...
i.i.k.'s user avatar
  • 1,343
0 votes
1 answer
120 views

PyQGIS: running PyQGIS-script in Pycharm doesn't update map view-Refresh?

I have tried to setup my PyQGIS development environment to use PyCharm, by opening my script in Pycharm, then change the python interpreter to the path C:/ProgramFiles/QGIS 3.28.3/bin/python-qgis.bat (...
i.i.k.'s user avatar
  • 1,343
0 votes
0 answers
67 views

How to configure PyCharm Terminal for ArcGIS Pro so that the current path points to the project instead of arcgispro-py3?

I have followed Configure Python interpreter for ArcGIS Pro and Configure PyCharm Terminal for ArcGIS Pro found in this documentation. Below is my settings: I can open terminal in PyCharm and it ...
benchenggis's user avatar
  • 1,406
2 votes
1 answer
196 views

Having trouble adding a layer from a Geodatabase using ArcPy

I have been working on a project and have gotten to the following point: I have been able to create a Feature Class, here named GeocodedDonationLocations. This was successfully done with arcpy....
XanderXombie's user avatar
2 votes
0 answers
306 views

Setup QGIS in PyCharm

I had been working with PyCharm 2019 with QGIS, and the setup was working fine, Now I've upgraded PyCharm to 2022.2.4 Pro, and QGIS core modules are not able import. Here is my bat file. I am using ...
VSR's user avatar
  • 53
1 vote
3 answers
540 views

Running SAGA tools from Pycharm standalone QGIS (PyQGIS)

I am trying to run SAGA through the Python interface of QGIS. So far I have worked with only Native QGIS, and below code works for native. I would like to use SAGA fromout the same script, but am ...
RickB's user avatar
  • 13
0 votes
2 answers
427 views

A Python Script that runs without issue in ArcGIS Pro fails in PyCharm

I have created a script in ArcGIS Pro to delete and copy some datasets from one location to another. It works flawlessly when run through ArcGIS Pro. When I attempt to run the script in PyCharm, ...
Matt Beal's user avatar
3 votes
1 answer
477 views

Connect QGIS with PyCharm

I don't get the concept of developing with Python in QGIS. There is a Tutorial in the QGIS docs how to setup PyCharm for developing standalone scripts or how to develop custom applications. The first ...
Jim Panse's user avatar
  • 203
0 votes
2 answers
295 views

Referencing variable in path using Python [closed]

I am fairly new to Python and have always used it in ArcGIS Pro. I have now moved to PyCharm and feel I am missing some of the basics. It's pretty simple I am just wanting just wanting to make the ...
Vanessa Donley's user avatar
1 vote
5 answers
2k views

Setting up ArcGIS Pro 3.0 Python env in PyCharm - Can´t import arcpy module

I'm trying to set up PyCharm to work with the Python environment (Python 3.9.13) installed with ArcGIS Pro 3.0 on a new computer (Win 11). I've tried cloning the environment both from within ArcGIS ...
Emanuelv's user avatar
3 votes
0 answers
258 views

Bringing PyQGIS and PyQt into already settled Anaconda Python environment in PyCharm

I have Anaconda Python environment with different packages required for developing a QGIS plugin (including the Plugin Builder Tool etc.). (qgsdata) C:\TempDaten\_dev\QgsData>conda info ...
Taras's user avatar
  • 32.8k
1 vote
1 answer
384 views

geopandas error "OSError: could not find or load spatialindex_c-64.dll" in PyCharm using OSGeo4W paths

Using https://spatialgalaxy.net/2018/02/13/quick-guide-to-getting-started-with-pyqgis3-on-windows/ I created a .bat file to load the OSGeo4W and QGIS paths into PyCharm. Now I am getting an error ...
MrKingsley's user avatar
  • 1,443
2 votes
2 answers
922 views

Importing gdal in QGIS and PyCharm not working

Trying to import gdal from osgeo and I'm getting this error; ImportError: DLL load failed while importing _gdal: The specified module could not be found. On Windows, with Python >= 3.8, DLLs are ...
MrKingsley's user avatar
  • 1,443
2 votes
1 answer
759 views

How to fix "No module named grass.script" error in Linux PyCharm?

I'm trying to use v.generalize in the GRASS GIS library within a python code in PyCharm on my Linux Ubuntu system to make a shapefile that originally was a raster look less "blocky" by ...
user2031's user avatar
  • 221
2 votes
1 answer
161 views

Making imports explicit in PyQGIS and PyQt

There is a QGIS plugin based on the PyQGIS/PyQt code with some imports defined in the beginning: from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import * from qgis.core ...
Taras's user avatar
  • 32.8k
0 votes
0 answers
83 views

Read CSV file with x/y to shapefile in standalone PyQGIS Script

I have read quite a few Q&As on this topic so far but still I have problems with correct import CSV file. I'm working in PyCharm and trying write function which will read CSV and save as vector ...
nomad_gis's user avatar
0 votes
1 answer
2k views

Folium and heatmap is not opening in pycharm

I'm using PyCharm version 3.7. When I tried to open simple folium map I'm not getting any output. I tried something like this import folium import pandas as pd import csv dataframe=pd.read_csv("...
user199125's user avatar
-1 votes
2 answers
4k views

Installation error of GeoPandas in PyCharm

How can I install GeoPandas in PyCharm? I tried to install GDAL first and GeoPandas but nothing works I'm getting installation failed error. The error is 'installation failed you need visual studio to ...
user199125's user avatar
2 votes
1 answer
353 views

ModuleNotFoundError: No module named 'qgis' MacOS

trying to setup pycharm for QGIS development in MacOS. I added to the interpreter path the QGIS bin path /Applications/QGIS.app/Contents/MacOS/bin but still no luck. All the guides I find are for ...
Micha's user avatar
  • 163
0 votes
0 answers
111 views

using rioxarrays plot in pycharm

Using the method print in pycharms jupyter notebooks will raised TypeError: can only concatenate tuple (not "str") to tuple, but when calling a cell afterwards the result will be ploted ...
Sebastian H's user avatar
1 vote
0 answers
745 views

PyCharm with pytest run configuration fail importerror PyQt5 with pipenv

I have difficulties setting up PyCharm to run my tests correctly while using a pipenv interpreter if i run my tests through a terminal with pipenv run pytest it works perfectly because it loads the ....
Kalak's user avatar
  • 3,703
1 vote
0 answers
297 views

QGIS 3.16 version cannot open python console in PyCharm development environment for standalone application

We developed a few standalone PyQGIS application using QGIS's libraries that come with QGIS installed program. A bit more information about our application setup. We develop using PyCharm on Windows ...
For Comment's user avatar
  • 1,113
-1 votes
2 answers
13k views

Pycharm settings error "Environment location directory is not empty"

I am trying to import arcpy into a script in PyCharm 2021.1. I do not have access to ArcGIS Pro, so I used the advice on this page to clone python 3.7 in Anaconda. I am trying to change the PyCharm ...
Regulus's user avatar
  • 23
0 votes
0 answers
382 views

PyQGIS not working with PyCharm on Windows, only Ubuntu

I can't make PyCharm work with PyQGIS on Windows. On Ubuntu I did the following to make it work: Installed QGIS Installed PyCharm New project with existing interpreter System Interpreter --> usr/...
Dániel Anderle's user avatar
1 vote
1 answer
111 views

Computing NDVI with PyQGIS in PyCharm

I'm actually new to Python and QGIS. I'm using PyCharm as my code editor. I'm trying to load a raster layer in the following below: import os import qgis.core from osgeo import gdal,gdal_array from ...
Joshua O. Mustapha's user avatar
1 vote
1 answer
1k views

AttributeError: 'NoneType' object has no attribute 'parameterDefinitions'

I'm trying write simple code line in PyQgis in PyCharm, have already set environment in PyCharm and seems to be working fine because I can iterate through f.i fields in vector layer proceed with ...
nomad_gis's user avatar
0 votes
2 answers
260 views

ArcPy exporting maps to PNG problem - raster DEM does not show up in exported map file

I sm using ArcGIS Desktop (ArcMap) 10.8.1 and PyCharm 2020.3.3. I'm trying to use a simple script to loop through a folder and export a PNG file for each MXD in the folder. The script works fine, and ...
S Koenig's user avatar
3 votes
0 answers
241 views

PyQGIS API code completion not working in PyCharm In QGIS3.10 on Windows10

I am configuring Pycharm 2020.3 to work with QGIS3.10 on Windows. I have followed the various instructions from previous answers. Configure the interpreter. Pycharm recognizes Qt including ...
Luis Perez's user avatar
  • 1,284
1 vote
1 answer
85 views

Field Calculator python to Python code

I am trying to convert a python code from field calculator to arcpy (pycharm). All i am wanting to do is convert the below python code into a way python in pycharm will read it. !Owner_Ab!.title() ...
Vanessa's user avatar
  • 113
2 votes
1 answer
137 views

PyCharm doesn't fully recognise PyQGIS 3.18 API

I use PyCharm CE 2020.3.3 (also tested with 2020.2.5) and just upgraded QGIS to the new version 3.18 (first version with Python 3.9). When I updated my start script for PyCharm and updated the Python ...
fuzzysolutions's user avatar
1 vote
0 answers
321 views

Why does my arcpy script's da.UpdateCursor get slower the longer it runs?

I have a layer containing pedestrian crosswalks (line features), and two layers containing street data: street segments (line features) and street nodes (point features). Every street segment has a ...
Dan C's user avatar
  • 12.2k
7 votes
1 answer
1k views

Python - Correct way of closing ogr.DataSource() objects

I learned that I need to close objects that I open, usually using a with open(): statement that does the closing for you after leaving it. With GDAL/OGR, this does not work and objects must be closed ...
s6hebern's user avatar
  • 1,236
0 votes
1 answer
84 views

Using loops within an equation for Python and inputting values into QGIS [closed]

I would like to incorporate the use of loops within my Python coding equation. I am looking to find the value for the radius (distance) for multiple earthquakes and their corresponding intensity ...
LiamHems's user avatar
  • 193
0 votes
0 answers
89 views

Setting the Python interpreter in PyCharm 2020.2.3, using QGIS 3.10.11. Error "No module qgis exists"

I'm trying to find out where I'm going wrong in trying to set up PyCharm to make standalone QGIS Python scripts. The very first step in the tutorial is "from qgis.core import *" I've tried ...
caffeinebos's user avatar
2 votes
1 answer
130 views

Soil Adjusted Vegetation Index in ArcPy

I am attempting to run the SAVI function (found within the Spatial Analyst module) in ArcPy. However, this function is not showing up for me regardless of there being multiple ArcGIS pages with code ...
Katie B.'s user avatar
-1 votes
1 answer
347 views

Add shapefile into ArcMap project using PyCharm and ArcGIS 10.8

I am using ArcGIS 10.8 and PyCharm. I need something very simple apparently, but I can't do it. I want to add an existing shapefile to my ArcMap project using Python from PyCharm. With my project open ...
Jota Q's user avatar
  • 85
2 votes
1 answer
99 views

FeatureClassToFeatureClass_conversion where_clause ignored in PyCharm console

When I call arcpy.FeatureClassToFeatureClass_conversion from the PyCharm python console, the where_clause argument is ignored. When a value is supplied, it does not return an error message, nor does ...
Matt's user avatar
  • 752
1 vote
0 answers
381 views

Accessing PostgreSQL/PostGIS tables as inputs into QGIS (PyQGIS) standalone processing scripts

With the help of Stack Exchange I have been able to set up a PyCharm environment in which I am able to run QGIS geo-processing queries, so away from the Python console in QGIS itself. If I point to ...
TrevP's user avatar
  • 611
1 vote
0 answers
127 views

Editing Labels in Legend using ArcPy in PyCharm

I have created this map in PyCharm with ArcPy software, and was wondering if there is a code I can use to remove the 'High' and 'Low' labels and just show the numeric values in the legend. Using ...
K_atarina's user avatar
2 votes
1 answer
713 views

Configuring PyCharm to work with QGIS libraries

I have been following various posts and tutorials including Anita Graser's posts Anita Graser and https://gis.stackexchange.com/questions/302774/ as I try to set up my PyCharm installation to access ...
TrevP's user avatar
  • 611
0 votes
1 answer
61 views

Error with updating a legend's style item in pycharm

I am trying to update an item in the legend with a style item, this is the code: #Add Legend legend = arcpy.mapping.ListLayoutElements(mxd, "LEGEND_ELEMENT", "Legend") [0] ...
K_atarina's user avatar
2 votes
1 answer
180 views

Missing classes from qgis.core module only in PyCharm's editor

I would like to use PyCharm Community Edition 2020.1.2 x64 on Windows 10 as IDE for writing QGIS plugins. I need to base on old version - QGIS 2.18, so I need python 2.7, qt4, and also core modules ...
Marek Kania's user avatar
0 votes
1 answer
184 views

Creating QGIS Shapefile in PyCharm leaving some attributes NULL

I've created the shapefile and can manually enter in all the attributes to come in fine, but when I call it any other way (which I will need to do), the values for the floating types appear as NULL, ...
Barnard87's user avatar
  • 141