Questions tagged [pycharm]

A Python Integrated Development Environment (IDE)

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

Cannot load PyQGIS/PyQT modules: ModuleNotFoundError: No module named '_shaded_thriftpy' in PyCharm

New to PyQGIS. I am trying to set up my environment to create PyQGIS scripts. I have QGIS Zurich 3.18.2 installed which I installed through the OSGeo 32bit installer. I have PyCharm Community Edition ...
0
votes
2answers
24 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 ...
3
votes
0answers
70 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 ...
1
vote
1answer
33 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() ...
1
vote
1answer
45 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 ...
0
votes
0answers
36 views

Installing arcpy package in PyCharm interpreters with ArcMap

There are lots of questions on GIS SE about importing ArcPy but I can't find a set of instructions that work for me. I know very little about paths and environments, so don't understand most of the ...
1
vote
0answers
44 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 ...
4
votes
1answer
111 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 ...
0
votes
1answer
29 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 ...
0
votes
0answers
46 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 ...
2
votes
1answer
63 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 ...
-1
votes
1answer
65 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 ...
2
votes
1answer
46 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 ...
0
votes
0answers
98 views

DLL load failed when loading PyQGIS in PyCharm with script (Windows)

I am trying to setup PyCharm to work with PyQGIS. I followed this tutorial: https://silverspringenergy.com/using-pycharm-as-an-ide-for-qgis-3-plugin-development-2/. Some files were located elsewhere ...
1
vote
0answers
84 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 ...
0
votes
0answers
42 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 ...
1
vote
1answer
72 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 ...
0
votes
1answer
32 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] ...
0
votes
0answers
18 views

User defined folder location for QGIS3 temp files in Pycharm

I set up user defined paths for temporary files in the QGIS version that I'm using (settings -> options -> systems). When I run code within QGIS3 the temporary files are saved in the indicated ...
2
votes
1answer
60 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 ...
0
votes
1answer
72 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, ...
2
votes
1answer
98 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 ...
1
vote
1answer
44 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: ...
2
votes
0answers
102 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 ...
5
votes
1answer
1k 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 ...
0
votes
0answers
78 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: ...
1
vote
1answer
886 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 ...
1
vote
2answers
1k 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....
0
votes
0answers
69 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 ...
1
vote
0answers
44 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'...
1
vote
1answer
264 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 ...
1
vote
0answers
360 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 ...
1
vote
1answer
40 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 ...
1
vote
0answers
20 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.
0
votes
1answer
99 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 ...
0
votes
0answers
852 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, ...
1
vote
1answer
2k 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 ...
3
votes
1answer
224 views

Setting up PyCharm 64bit with QGIS 64bit OSGeo4W64 installation on Windows

Trying to setup PyCharm Community Edition 64Bit with QGIS OSGeo4W64 installation on Windows so that I can debug some python and reference the QGIS/Qt modules. I tried the folowing tutorials; https://...
3
votes
0answers
138 views

QGIS Plugin reload is incomplete

I am developing a QGIS Plugin in PyCharm. I use the QGIS Plugin "Plugin reloader" to reload the plugin when I want to test the plugin. But changes in the code are not applied on running the plugin ...
1
vote
2answers
86 views

ArcPy update a field based on the value of another field containing wildcard text

I have a file geodatabase feature class (fc). I want to update Field 1 (Colour) with text where Field 2 (Description) contains a certain word. ie. Field 2 contains the string 'the ball is red and ...
0
votes
2answers
674 views

Importing ArcPy installed with ArcGIS Pro in PyCharm

I am trying to import arcpy in a script, which is running in a PyCharm environment using the Python 3.6.6 installation that comes bundled with ArcGIS Pro 2.3.2 as the base interpreter. I get the ...
5
votes
1answer
1k views

Import qgis.core in PyCharm: “No Module Named Pyqt5.Qtcore”

I would like to work on Python script with tools from qgis in a standalone software (like Pycharm or IDLE). I am quite new with Python programming and with setting up a work environnement. In order ...
2
votes
1answer
246 views

QGIS3 Python Plugin External Module

I am building a plugin based around PyQt5.QtChart This line will not work as QGIS (3.8) appears to use its own python. It works fine in my python IDE. I have confirmed that QGIS is using a different ...
1
vote
1answer
114 views

QGIS: prefixPath() gives NULL in PyCharm

I have installed QGIS 2.18, QGIS 3.8 and OSGeo on a Windows machine. I tried to set up a PyCharm environment for PyQGIS coding, but I can't initialize the OGR provider to import shapefiles. Here's ...
2
votes
0answers
81 views

IDE PyCharm settings for developing a QGIS plugin

How do i setup pycharm to recognize QGIS modules? IDE: PyCharm OS: Ubuntu 18.04 QGIS: 3.8 example of imports this answer is very close to the solution but I cannot add the interpreter location I'...
2
votes
1answer
151 views

Importing shapefile into PyCHARM with QgsVectorLayer “Layer is not valid”

I'm using PyCharm with QGIS3 and Python3. I tried this code to import a shape file and the other to connect to PostGIS vector layer. The codes goes right on the python console of QGIS, but in the ...
1
vote
2answers
281 views

`pyproj` initialization error in PyCharm but not in cmd?

I am currently struggling to get pyproj to initialize when running in PyCharm. Oddly enough, I am able to get it to work in cmd. The version of pyproj I am using is 1.9.6, and the version of proj4 I ...
0
votes
1answer
45 views

Unable to install gdal2tiles on PyCharm

I have installed gdal 2.4.1 while installing gdal2tiles. I am getting this error: ERROR: Could not find a version that satisfies the requirement GDAL==2.4.1 (from gdal2tiles) (from versions: 1....
2
votes
2answers
85 views

Raster processing “Tool is not licensed” [closed]

I have a piece of python code written that works fine on a small test area but when I blow up the size of the test area I get a "tool is not licensed" error. arcpy.CheckOutExtension("Spatial") ...
0
votes
1answer
270 views

PyQgs: unresolved reference for QgsProject() and QgsVectorLayer()

In my code I'm using the classes QgsProject() and QgsVectorLayer(). However PyCharm gives me the following error: Unresolved reference 'QgsProject' Inspection info: This inspection detects names ...