Questions tagged [pycharm]

A Python Integrated Development Environment (IDE)

Filter by
Sorted by
Tagged with
0 votes
0 answers
21 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 ...
user avatar
  • 24k
1 vote
1 answer
56 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 ...
user avatar
  • 1,189
1 vote
1 answer
65 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 ...
user avatar
  • 1,189
2 votes
1 answer
71 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 ...
user avatar
0 votes
0 answers
45 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 ...
user avatar
  • 24k
0 votes
0 answers
37 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 ...
user avatar
0 votes
0 answers
85 views

Contour plot over a offline map

I am trying to plot a contour plot on the offline map. My contour plot is this: import numpy as np from scipy.interpolate import griddata as gd from matplotlib import pyplot as plt y = np.linspace(...
user avatar
0 votes
1 answer
472 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("...
user avatar
-2 votes
1 answer
1k 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 ...
user avatar
1 vote
0 answers
56 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 ...
user avatar
  • 133
0 votes
0 answers
70 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 ...
user avatar
1 vote
0 answers
359 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 ....
user avatar
1 vote
0 answers
69 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 ...
user avatar
  • 1,077
-1 votes
1 answer
2k 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 ...
user avatar
  • 23
0 votes
0 answers
118 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/...
user avatar
1 vote
1 answer
67 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 ...
user avatar
1 vote
1 answer
868 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 ...
user avatar
0 votes
2 answers
120 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 ...
user avatar
3 votes
0 answers
154 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 ...
user avatar
  • 1,344
1 vote
1 answer
51 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() ...
user avatar
  • 113
2 votes
1 answer
106 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 ...
user avatar
1 vote
0 answers
88 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 ...
user avatar
  • 12k
4 votes
1 answer
509 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 ...
user avatar
  • 1,154
0 votes
1 answer
37 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 ...
user avatar
  • 173
0 votes
0 answers
59 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 ...
user avatar
2 votes
1 answer
91 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 ...
user avatar
-1 votes
1 answer
164 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 ...
user avatar
  • 55
2 votes
1 answer
61 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 ...
user avatar
  • 722
1 vote
0 answers
204 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 ...
user avatar
  • 581
1 vote
0 answers
95 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 ...
user avatar
2 votes
1 answer
216 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 ...
user avatar
  • 581
0 votes
1 answer
42 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] ...
user avatar
2 votes
1 answer
111 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 ...
user avatar
0 votes
1 answer
134 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, ...
user avatar
  • 131
6 votes
1 answer
389 views

Creating a Polyline from a list of QgsPoints using PyQGIS when working in PyCharm

So I have a .csv of points that I've cleaned up using pandas, and appended to a list with each item being Type: QgsPoint, with it's correct X and Y coordinate. I'm trying to find the correct operation ...
user avatar
  • 131
2 votes
1 answer
87 views

Shapefile type description showing attribute error

import arcpy esc = arcpy.Describe("C:\Users\Drona_Maps\Desktop\lecture16\shapefiles\world_continents.shp") print esc.ShapeType Shape file type description showing attribute error like this: ...
user avatar
2 votes
0 answers
167 views

Getting a warning of "unexpected argument" for PyQGIS processing parameter in PyCharm

When specifying named argument for any type of QgsProcessingParameter, PyCharm complains of an Unexpected Argument warning. Although it doesn't cause any issue to the execution of the Processing ...
user avatar
  • 121
7 votes
2 answers
3k views

Using PyQGIS in PyCharm 2020

I'm referring to this post: Why does QGIS 3.2 "native:extractvertices" algorithm not work properly in standalone script? as part on creating startup file py3-env.bat for opening PyCharm ...
user avatar
0 votes
0 answers
135 views

Error whenever I try to geocode

I used this code to calculate my centroid and the centriod co-ordinates I get is "314167.7583680855,239312.8503371872". however whenever I try to geocode this co-ordinate I get an error. ERROR: ...
user avatar
  • 133
1 vote
1 answer
2k views

Finding the centroid of a merged polygon using shapely function

I have a polygon shapefile and I want to find the centroid of the polygon, and output the centroid as a new shapefile before I geocode. How I should do this with Python functions shapely and Fiona and ...
user avatar
  • 133
1 vote
2 answers
3k views

Selecting specific rows and column from a shapefile using Fiona and Shapely

I am new to using PyCharm, but I am trying to cut out 4 rows from a county shapefile from that 4 rows specify the columns or attributes to also be extracted and output the result as a new shapefile....
user avatar
  • 133
0 votes
0 answers
135 views

Python script not delivering expected output for Vegetation indices (NDVI, CLgreen) using ArcPy and ArcGIS

I have a script that was written in Python in PyCharm. The script is something meant to run once then all the indices I list in the python can run from PyCharm rather than opening the ArcMap or ...
user avatar
1 vote
0 answers
58 views

Setup PyCharm to develop Python scripts for QGIS?

I want to set up for the first time an environment with PyCharm to write scripts for QGIS on my Ubuntu desktop and I'm completely lost. I'm not having problems with the console on QGIS, but I couldn'...
user avatar
1 vote
1 answer
342 views

Setting up PyQGIS 3 (QGIS 3.12) interpreter in PyCharm 2018.3.7

I cannot set up the correct interpreter for PyQGIS 3 in PyCharm 2018.3.7. Using: QGIS 3.12.0, OSGeo4W64, Python 3.7 (part of the OSGeo4W64 folder), PyCharm 2018.3.7. My .cmd files in OSGeo4W64 look ...
user avatar
  • 481
3 votes
0 answers
695 views

Viewing GeoPandas Dataframe in VScode or PyCharm like Pandas Dataframes

I'm not sure if this is a missing feature or something that I couldn't figure out so I wanted to get some help; I started learning geopandas library, now I'm following some tutorials I realized that ...
user avatar
  • 431
1 vote
1 answer
46 views

Error calculating field with script exported from ModelBuilder

I am attempting to add a new field called "TimeYrCode" to a list of shape files, and then add values to this field based on the value of the "gridcode" attribute, which represents different days of ...
user avatar
1 vote
0 answers
41 views

Missing SQL Code Style [closed]

I'm missing the Editor Option for Code Style SQL. Its not in the Options and I am using PyCharm Community 2019.3 on Manjaro.
user avatar
  • 11
0 votes
1 answer
162 views

Catching a system exit caused by ArcPy in PyCharm?

Using ArcPy in PyCharm, I'm constantly getting Process finished with exit code -1073741819 (0xC0000005) in my RegionGroup loop. I have posted my code in a previous question (Process finished with exit ...
user avatar
0 votes
0 answers
2k views

Process finished with exit code -1073741819 (0xC0000005) from RegionGroup (ArcGIS 10.7)

I'm trying to automate my work using ArcPy in PyCharm on Windows. However, when I run the following (abridged) loop, it exits at random points: sometimes at the 4th iteration, sometimes at the 31st, ...
user avatar
1 vote
2 answers
3k views

QGIS 3.10, Python IDE - Application path not initialized

I installed QGIS 3.10 on Win10-64 and I try to use the qgis core and processing functionalities from PyCharm IDE. I used to do this successfully with previous QGIS versions, but this time the output ...
user avatar
  • 581