Questions tagged [pycharm]
A Python Integrated Development Environment (IDE)
106
questions
15
votes
6answers
2k views
PyCharm 2019 is not working with QGIS anymore
Since the update to PyCharm 2019 I am unable to load the QGIS Python modules.
I can not use auto completion either.
I already deleted the cache (by invalidating the cache in PyCharm and also by ...
14
votes
5answers
19k views
Setting up PyCharm to reference ArcPy?
How would I setup PyCharm to recognize import arcpy?
I'd like to use PyCharm to develop and debug geoprocessing tool.
11
votes
3answers
23k views
Fixing “The SDK seems invalid” error when setting up PyCharm and PyQGIS?
I wanted to set up PyCharm the way this blog post explains: Setting up PyCharm for PyQGIS and Qt.
I did everything as instructed but when it comes to adding project interpreters I got this error ...
11
votes
1answer
638 views
How to connect Qgis with pycharm in Ubuntu OS
I have just started using pycharm with qgis but could not connect both of them. Pycharm always stays in a state of "waiting for connection". Most the tutorials available points to the windows but I am ...
7
votes
1answer
3k views
Using PyCharm with QGIS 3?
I've just changed to QGIS 3 and I can't figure out why I can't change from Python 2.7 to Python 3.6 in PyCharm, keep getting invalid SDK!
I run this .bat-file:
SET OSGEO4W_ROOT=C:\OSGeo4W64
SET ...
7
votes
2answers
3k views
How to define pycharm to understand PYQGIS and GDAL
I use pyqgis in standalone apps and I have defined paths in Windows and Python paths to take python API from outside QGIS.
I have created some simple tools using pygis and GDAL in standalone script ...
6
votes
1answer
1k views
How is Python IDE aware of ArcPy?
I am using PyCharm 4 for some Python scripting.
When I type:
import arcpy
I can immediately start using items within the arcpy namespace, like the environment & workspace objects.
How does ...
6
votes
1answer
3k views
Adding QGIS-specific Python interpreter to PyCharm on Windows?
I am having trouble adding a QGIS-specific Python interpreter to PyCharm. Ideally, I would like to be able to switch between both Python2 and Python3 in PyCharm. I thought this might be possible by ...
6
votes
0answers
581 views
Setting up PyCharm CE 4 to work with PyQGIS library in Mac OS
I am trying to set up pycharm to work with pyQgis library but with not success till now. I am using PyCharm CE v4 and QGIS version 2.8 I have tried to implemnte the instructions of several posts like ...
5
votes
1answer
553 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 ...
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 ...
4
votes
2answers
2k views
Set up PyCharm for PyQGIS 3 development
I'd like to setup PyCharm for PyQGIS 3 development. There is a good guide for PyQGIS 2, but those steps only make python 2 available, and I want to use python 3. Selecting python3 as interpreter ...
4
votes
1answer
288 views
Making Upload button for shapefile in QGIS plugin?
I am new to Plugin Builder and creating my first plugin called NearestNeighbour. The below is GUI of my plugin made using Qt Creator
I read in this link that it is important to rename Dialog Box, ...
4
votes
1answer
3k views
Understanding qgis.core import error: no module named qgis.core?
I searched all the same questions, and none of them works for me, so i decided to ask this question in addition to those:
I installed QGIS 2.18 via this downloaded setup 'QGIS-OSGeo4W-2.18.11-1-Setup-...
4
votes
1answer
68 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 ...
3
votes
2answers
1k views
Error from create a reference to the QgsApplication
I followed these getting started instructions to create a standalone script in pycharm.
The only thing I did differently was to download the standalone installer, not the network installer.
I'm ...
3
votes
1answer
187 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
2answers
1k views
Python script hanging forever in Pycharm with import arcpy?
I'm trying to get arcpy to work in Pycharm. I've done this successfully in the past. However, now when I try to do anything involving arcpy in Pycharm, the program runs then hangs forever. I have it ...
3
votes
0answers
105 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 ...
3
votes
0answers
768 views
Pycharm cannot find reference 'SearchCursor' in 'arcpy.da' [duplicate]
Whenever I try to use a search cursor from arcpy in pycharm, I get this unresolved reference error. I should note that it was working fine earlier in the night, I have no idea what happened.
I've ...
3
votes
0answers
458 views
PyQGIS with Pycharm CE 4.5
I'm able to run PyQGIS on my Mac (OSX 10.10.3) through the Python (2.7) console and through execution of Python files through my terminal. In order to do so, I added the following to my bash_profile:
...
2
votes
1answer
2k views
IDE (PyCharm) settings for developing with Processing in Linux (Ubuntu)
How to setup Python interpreter in IDE to develop using Processing module? I need this not for running from IDE, but to have tips about classes, methods, arguments etc.
IDE: PyCharm 2016.3 (but ...
2
votes
2answers
269 views
How do I run SAGA algorithms in PyCharm? [closed]
Is there anyway I can input a raster and number and then use the SAGA algorithm "Fill Sinks (Wang and Liu)" on the raster through an IDE such as PyCharm?
How would I go about calling the algorithm?
...
2
votes
1answer
211 views
PyQGIS equivalent for ArcPy ListFields
I just started using PyQGIS and I am not familiar with many of the commands.
In ArcPy, you can use the command arcpy.ListFields to print out the fields present in a shapefile. I'm wondering if there ...
2
votes
1answer
48 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 ...
2
votes
1answer
68 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 ...
2
votes
2answers
2k views
Running and debugging PyQGIS scripts in PyCharm Community Edition?
I am working with creating plugins for QGIS 2.4.0 (Chugiak). I am curious to know how I can write the codes, and debug them in the environment I am comfortable in, i.e. PyCharm Community Edition 3.4.1....
2
votes
1answer
234 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 ...
2
votes
2answers
78 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")
...
2
votes
1answer
406 views
Attempting to run first script after setting up environment for QGIS and python?
I uninstalled arcmap and all existing python installations. Then I followed the instructions from https://www.youtube.com/watch?v=Chq9fTRKsHk&t=2s to install qgis and set the environment variables....
2
votes
1answer
160 views
Creating and calling virtual environment to run ArcPy script?
I'm getting a new computer and am trying to set up my virtual environments the right way. In the past, I've just been using PyCharm and running everything through "C:\Python27\ArcGIS10.6" so it's a ...
2
votes
1answer
260 views
PyQGIS standalone app with pycharm : exit code -1073741819 (0xC0000005)
I try to run standalone PyQgis code with PyCharm, but I always have this result :
Process finished with exit code -1073741819 (0xC0000005)
I tried my code line by line, and this result appear after ...
2
votes
1answer
845 views
Can't open shapefile with GeoPandas
I downloaded a shapefile from the Brazilian Institute of Geography and Statistics (IBGE). I can open it on QGIS and work with it perfectly there, but I need to work with it using Python.
I'm trying ...
2
votes
1answer
416 views
Unable to run scripts with arcpy using ArcGIS Pro and Pycharm?
I have installed ArcGIS Pro 2.0 which runs Python 3.5.3. I am trying to get started with the Arcpy library using the IDE PyCharm.
I started a new project and pointed to the python file of the ArcGIS ...
2
votes
1answer
397 views
Executing a voronoi polygon to a shapefile With Pycharm
I'm trying to get a voronoi polygon from points using Pycharm.
I've tried:
processing.runalg("qgis:voronoipolygons", file ,1, "C:\Voronoi.shp" )
but it doesn't work. It works in the python console ...
2
votes
0answers
75 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 ...
2
votes
0answers
77 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
0answers
385 views
PyCharm and ArcGIS Pro issue: Arcpy Must Run From Inside the Conda Environment,
I am getting the following error when running my python scripts in Pycharm, does anybody know how to fix it? it is very odd, because it was working just fine, then installed some updates on ArcGIS Pro ...
2
votes
1answer
1k views
How to convert a spatial Oracle LOB object type to a Geodataframe listlike geometry object column
I have in my dataframe one column with cx_Oracle.LOB object [2D polygon type], made with a SDO_UTIL.TO_WKTGEOMETRY SQL function and I want to create a geodataframe, and set my geometry column the ...
1
vote
1answer
34 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:
...
1
vote
2answers
255 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 ...
1
vote
2answers
1k views
QGIS standalone application, problem with prefix path
I am trying to create a standalone application of QGIS in PyCharm. My code is:
app = QgsApplication([], True)
app.setPrefixPath("usr/lib/qgis/plugins", True)
app.initQgis()
canvas = QgsMapCanvas()
...
1
vote
1answer
487 views
ArcPy 64bit giving 0xC0000005 error with PyCharm
I have a simple script, which converts raster to shapefile and merges all the shapefiles. It does not really matter. The execution is fine, everything finishes but:
I am using PyCharm Community 2018....
1
vote
1answer
668 views
Python new packages installation with ArcGIS interpreter?
I would like to introduce some functions derived from scipyin my code. Since I also need arcpy, I use the Interpreter installed inside ArcGIS, whose directory is: (C:\Python27\ArcGIS10.3\python.exe).
...
1
vote
1answer
1k 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 ...
1
vote
2answers
72 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 ...
1
vote
1answer
508 views
Error when running Split by Attributes tool from arcpy- arcgisscripting.ExecuteError: 'str' object has no attribute 'polygon' -
I am trying to use the Split by Attributes tool in arcpy to split a shapefile with 18 point features into 18 separate shapefiles. It works as expected in ArcGIS Pro, but when I run the following ...
1
vote
2answers
138 views
Update Cursor keeps Crashing and Skipping
I use a 3rd party software that exports the name of JPEG as I collect points, in this case street signs. I know the names stay static and are all unique but different features may have the same JPEG (...
1
vote
2answers
1k views
Setting up ArcMap to debug scripts in PyCharm?
I'm wondering whether anyone succeeded at setting up ArcMap to debug python scripts in PyCharm. I've tried several times to configure both, but failed.
1
vote
1answer
64 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 ...