Problems with GDAL, Libspatialite, Rasterio and Sumo (ImportError, Symbol _GEOSArea not found, Referencing from libspatialite.7.dylib) - gdal

I'm new to using gdal/libspatialite/rasterio/sumo and all the family of library and packages that is related to geographical, time and space. But I was just wondering what's this error here? Does anyone have experience with this error before? Have you seen it before? And if so have you been able to resolve it? And if so, what were the things you did to resolve it. I'm stuck with this for almost days now and idk what else to do. I'm running this on Python 3.9.6 on a MacOS Big Sur. I'm confused whether the problem is either one of these packages (or a combination of).
It's really annoying how it doesn't work here but works perfectly fine in my old computer that runs in MacOS Catalina with Python 3.9.0. Thank you in advance for your time.
File "/opt/homebrew/lib/python3.9/site-packages/contextily/__init__.py", line 7, in <module>
from .place import Place, plot_map
File "/opt/homebrew/lib/python3.9/site-packages/contextily/place.py", line 7, in <module>
from .tile import howmany, bounds2raster, bounds2img, _sm2ll, _calculate_zoom
File "/opt/homebrew/lib/python3.9/site-packages/contextily/tile.py", line 16, in <module>
import rasterio as rio
File "/opt/homebrew/lib/python3.9/site-packages/rasterio/__init__.py", line 9, in <module>
from rasterio._base import gdal_version
ImportError: dlopen(/opt/homebrew/lib/python3.9/site-packages/rasterio/_base.cpython-39-darwin.so, 2): Symbol not found: _GEOSArea
Referenced from: /opt/homebrew/opt/libspatialite/lib/libspatialite.7.dylib
Expected in: flat namespace

Related

Burn MaixPy on Sipeed M1W

I am using Sipeed M1W and its LCD display white screen after I burned the demo.
Then I built and compiled MaixPy and burned micropython.bin to the board but it's still white and display following message on the terminal.
Official Site:http://www.sipeed.com/
Wiki:http://maixpy.sipeed.com/
[MAIXPY]Pll0:freq:320666666
[MAIXPY]Pll1:freq:159714285
[MAIXPY]Flash:0xc8:0x17
[MAIXPY]:Spiffs Mount successful
Traceback (most recent call last):
File "boot.py", line 14, in <module>
File "init.py", line 4, in <module>
OSError: [Errno 5] EIO
MicroPython d58620d on 2018-12-11; Sipeed_M1 with kendryte-k210
Type "help()" for more information.
>>>
According to the document it seems something go wrong in camera, but I don't know how to fix it or where I can find .bin to burn to the board make it works.
I got some help in the telegram group for this.
"You can delete code "import app" in boot.py, then compile and burn it agian"
but what worked for me finally was doing the extra step...
make pack_kfpkg
The kfpkg file will be in: C:\abc\MaixPy\ports\k210-standalone and you should flash that.
I put a MicroPython on the M1W board install guide on my blog here: https://robotzero.one/sipeed-maix-micropython/

Error using pymtp and libmtp

I am new to programming on python and i am trying to create an application which uses pyMTP to communicate to an MTP device. However im getting this error and cant figure out the fix for it.
$ python c:/Users/Atul/Desktop/mtp.py
None
Traceback (most recent call last):
File "c:/Users/Atul/Desktop/mtp.py", line 2, in <module>
import pymtp
File "C:\Users\Atul\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pymtp.py", line 42, in <module>
_libmtp = ctypes.CDLL(_module_path)
File "C:\Users\Atul\AppData\Local\Programs\Python\Python36-32\lib\ctypes\__init__.py", line 348, in __init__
self._handle = _dlopen(self._name, mode)
TypeError: LoadLibrary() argument 1 must be str, not None
Think it is not a program, but a library, you have to import. Like once in python, import mtp (or import pymtp, i don't know anymore). Please be aware pymtp is about 5 years old and does only run on python 2. I have been working on a python 3 version but it's not really complete because i found testing MTP software is extremely time consuming because the mtp interface is very, very slow at startup. I suggest to look at gMTP to transfer you files.

Tensorboard __init__() got an unexpected keyword argument 'purge_orphaned_data'

Running tensorboard for first time in a new VM and I end up with this error at tensorboard init(). Thanks for the help.
Traceback (most recent call last):
File "/home/sarath/virtualenvs/tensorflow/bin/tensorboard", line 9, in module> load_entry_point('tensorflow==0.7.1', 'console_scripts', 'tensorboard')()
File "/home/sarath/virtualenvs/tensorflow/local/lib/python2.7/site-packages/tensorflow/tensorboard/tensorboard.py", line 82, in main
purge_orphaned_data=FLAGS.purge_orphaned_data)
TypeError: __ init__() got an unexpected keyword argument 'purge_orphaned_data'
TensorBoard developer here. I'm quite confused how this happened, because while the purge_orphaned_data flag exists in master, it doesn't exist in r0.7.1. Actually, the file path tensorflow/tensorboard/tensorboard.py doesn't exist in 0.7.1 (it is in tensorboard/backend/tensorboard.py in 0.7.1).
So it looks like somehow you got an installation that mixes r0.7.1 but also files from master. Could you please file a Github issue on TensorFlow with a repro on how you got into this state?
I have the same problem. I deleted "purge_orphaned_data=FLAGS.purge_orphaned_data" and it worked.

error while installing modules in openerp 6.1

I have fresh openerp 6.1 and trying to install existing modules(like sale, purchase etc) but while installing it gives error "yaml_interpreter = YamlInterpreter(cr, module, idref, mode, filename=yamlfile.name, noupdate=noupdate) AttributeError: 'cStringIO.StringO' object has no attribute 'name'". I doesn't understand why this error to existed modules. anyone can help.
thanks in advance.
You may solve this as follows
1) In line 191 in the file server/openerp/tools/misc.py change
from cStringIO import StringIO
to
from StringIO import StringIO
2) After line 124 in the file server/openerp/modules/loading.py
add line
fp.name = filename

ImportError: No module named texttable (igraph, py2exe,cx freeze/gui2exe)

I've spent 2 days trying to solve this problem and I'm getting nowhere.
I try to get an executable from my python script.
Script is running with no issues. I build graphs in it by using igraph which is my favorite choice for this task.
After compiling my script I get the results as expected (Dist folder with my exe and its stuff in it)
When I try to run the exe I get this annoying error message:
File "igraph\__init__.pyc", line 36, in <module>
File "igraph\clustering.pyc", line 38, in <module>
File "igraph\summary.pyc", line 36, in <module>
File "igraph\vendor\__init__.pyc", line 33, in vendor_import
ImportError: No module named texttable
I checked many threads related to ImportError. I went in the folder containing texttable and IT'S THERE! It's not missing! I've tryed something with changing the path but still no succes.
at the beginning of my script I have:
import re
import os
import csv
import math
from igraph import *
import thread
import unicodedata
from time import sleep
import wx.grid as gridlib
import sys
import Tkinter
from Tkinter import *
I have tryed from igraph import Graph but it would still look for that TEXTTABLE.
I've tried using py2exe, cx freeze and also the nice Gui interface to them GUI2exe. No luck. Same Error whatever I try.
I'm sorry if the solution is obvious. I'm not a pro. Any help is much appreciated!
igraph is importing texttable dynamically, so the freezing tools don't know that they need to copy the module in.
In cx_Freeze, you could add igraph.vendor to 'packages' (see the docs) to force it to copy everything from that package. There's probably a similar option for py2exe.
Alternatively, if you put import igraph.vendor.texttable somewhere in the code, the freezing tools will pick that up and know to include it.