Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue trying to run code from page /notebooks/tutos/tuto_ship_detection.html

See original GitHub issue


I run the code provided below with the attached config file in Pycharm on Linux OS and everything works fine. When run in Pycharm on Windows 10, the below error occurs. This error occurs for PEPS and for other providers that the code previously worked for. There does not seem to be any information on this website (or anywhere else online) so it is not possible to to understand then fix the issue. Please can you help me?

All the best


# Code to be run #

# Link to SNAP Toolbox
snap_link ="C:\\Program Files\\snap\\bin"

# Name of config file
config_file = <same as file provided, it was just converted from .yml to .txt for downloading purposes>

# Set coordinates
lonmin = 13.01
lonmax = 13.9
latmin = 45.1
latmax = 45.9

# Set start and end date
start_date = "2021-05-01"
end_date = "2021-05-03"

# Select product type
product_type = "S1_SAR_GRD"

# Install packages
import os
import folium
from folium import plugins
import imageio
import matplotlib.pyplot as plt
import numpy as np
import rasterio as rio

from eodag.api.core import EODataAccessGateway
from eodag import setup_logging

# Add absolute path to SNAP bin folder to make the gpt command available
os.environ["PATH"] = snap_link + ":" + os.environ["PATH"]

# Set working directory
base_wd = os.getcwd()

# Create the workspace folder
workspace = 'eodag_workspace_shipdetection'
if not os.path.isdir(workspace):

# Move config file into workspace then start EODAG
if not os.path.isfile(os.path.join(base_wd, workspace, config_file)):
    os.rename(os.path.join(base_wd, config_file), os.path.join(base_wd, workspace, config_file))
dag = EODataAccessGateway(os.path.join(base_wd, workspace, config_file))

# Search for products in time and space
products, total_count =
   geom={"lonmin": lonmin, "latmin": latmin, "lonmax": lonmax, "latmax": latmax}
print(f"Got {total_count} products.")

# Error message ##

Access violation - no RTTI data!
Error while searching on provider peps (ignored):
Traceback (most recent call last):
  File "C:\Users\craig\PycharmProjects\Download_process_imagery\venv\lib\site-packages\eodag\api\", line 1037, in _do_search
    res, nb_res = search_plugin.query(count=count, **kwargs)
  File "C:\Users\craig\PycharmProjects\Download_process_imagery\venv\lib\site-packages\eodag\plugins\search\", line 225, in query
    qp, qs = self.build_query_string(product_type, **keywords)
  File "C:\Users\craig\PycharmProjects\Download_process_imagery\venv\lib\site-packages\eodag\plugins\search\", line 307, in build_query_string
    format_metadata(provider_value, product_type, **kwargs)
  File "C:\Users\craig\PycharmProjects\Download_process_imagery\venv\lib\site-packages\eodag\api\product\", line 368, in format_metadata
    return MetadataFormatter().vformat(search_param, args, kwargs)
  File "C:\Users\craig\AppData\Local\Programs\Python\Python38\lib\", line 167, in vformat
    result, _ = self._vformat(format_string, args, kwargs, used_args, 2)
  File "C:\Users\craig\AppData\Local\Programs\Python\Python38\lib\", line 211, in _vformat
    obj = self.convert_field(obj, conversion)
  File "C:\Users\craig\PycharmProjects\Download_process_imagery\venv\lib\site-packages\eodag\api\product\", line 182, in convert_field
    converted = self.custom_converter(value)
  File "C:\Users\craig\PycharmProjects\Download_process_imagery\venv\lib\site-packages\eodag\api\product\", line 204, in convert_to_rounded_wkt
    wkt_value = wkt.dumps(value, rounding_precision=COORDS_ROUNDING_PRECISION)
  File "C:\Users\craig\PycharmProjects\Download_process_imagery\venv\lib\site-packages\shapely\", line 62, in dumps
    return geos.WKTWriter(geos.lgeos, trim=trim, **kw).write(ob)
  File "C:\Users\craig\PycharmProjects\Download_process_imagery\venv\lib\site-packages\shapely\", line 402, in write
    text = string_at(result)
  File "C:\Users\craig\AppData\Local\Programs\Python\Python38\lib\ctypes\", line 514, in string_at
    return _string_at(ptr, size)
OSError: exception: access violation reading 0x0000000000000000
Exception ignored in: <function BaseGeometry.__del__ at 0x000002369631AD30>

Traceback (most recent call last):
  File "C:\Users\craig\PycharmProjects\Download_process_imagery\venv\lib\site-packages\shapely\geometry\", line 209, in __del__
  File "C:\Users\craig\PycharmProjects\Download_process_imagery\venv\lib\site-packages\shapely\geometry\", line 194, in _empty
OSError: exception: access violation writing 0x0000000000000000
Got 0 products.


Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

sbrunatocommented, Jan 14, 2022

Hello @craigmpearce , and thanks for reporting your issue. We’ll try to check and reproduce your error and then get back to you

CGuichardcommented, May 10, 2022

Closed by #392

Read more comments on GitHub >

github_iconTop Results From Across the Web

PHP code is not being executed, but the code shows in the ...
When I check the source code, the PHP code appears as HTML tags (I can see it in the source code). Apache is...
Read more >
How to Use PHP in HTML - Code - Envato Tuts+
In this article, I'll show you how to use PHP code in your HTML pages. It's aimed at PHP beginners who are trying...
Read more >
PHP Code Showing Instead of Running - ThoughtCo
You've written your first PHP program, but when you go to run it, all you see in your browser is the code—the program...
Read more >
How to Use PHP in HTML - YouTube
Learn how to use PHP code in your HTML pages. This video is aimed at PHP beginners who are trying to strengthen their...
Read more >
PHP include and require - W3Schools
The include (or require ) statement takes all the text/code/markup that exists in the specified file and copies it into the file that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found