error while installing modules in openerp 6.1 - odoo

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

Related

OSError: getsockaddrarg: bad family in GPYTHON files included into gpython 3L package. Why?

In gpython 3L package there are included such examples of codes:
name: test.py
You can find this code inside package as "script 3".
If I try execute this code I obtain error
If I do the same with code Hello_World.py
import androidhelper
droid = androidhelper.Android()
droid.makeToast('Hello, Android!')
print('Hello world!')
I getting the same error. What I do wrong ? Why standard script from gpython 3L package does not works ?
I'm newbie :)
ERROR of first code
error of second code

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

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

unable to import 'econml' in pandas

I have installed the 'econml' package but when I try to import DML, using :
from econml.dml import DML
I am getting the following error:
'ImportError: cannot import name 'show_config' from 'numpy' (unknown location)'
I am wondering how can I fix this issue.
Two steps:
Find any file named as "numpy.py" in your script directory and change it into another name.
Delete any file named as "numpy.pyc" or any other file generated while compiling your code.

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.

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.