I'm trying to import the application full feed from EPF. I only downloaded the application.tbz from the link provided by apple. This is the command I use to import the application file:
./EPFImporter.py -f /mnt/c/Users/vic4ever/Downloads/application/itunes20170913
This is what I get when I ran the above command
2017-09-24 00:58:51,867 [INFO]: Beginning import for the following directories:
/mnt/c/Users/vic4ever/Downloads/application/itunes20170913
2017-09-24 00:58:51,867 [INFO]: Importing files in /mnt/c/Users/vic4ever/Downloads/application/itunes20170913
2017-09-24 00:58:51,869 [INFO]: Starting import of /mnt/c/Users/vic4ever/Downloads/application/itunes20170913...
2017-09-24 00:58:51,870 [ERROR]: Unable to create EPFIngester for application
2017-09-24 00:58:51,870 [ERROR]: invalid literal for int() with base 10: '2074265\x02'
Traceback (most recent call last):
File "./EPFImporter.py", line 211, in doImport
fieldDelim=fieldDelim)
File "/mnt/d/Study/Semester2/icongenerator/EPF_Importer/EPFIngester.py", line 86, in __init__
self.parser = EPFParser.Parser(filePath, recordDelim=recordDelim, fieldDelim=fieldDelim)
File "/mnt/d/Study/Semester2/icongenerator/EPF_Importer/EPFParser.py", line 97, in __init__
self.recordsExpected = int(numStr)
ValueError: invalid literal for int() with base 10: '2074265\x02'
2017-09-24 00:58:51,876 [INFO]: Import of itunes20170913 completed at: 17-09-24 00:58:51
2017-09-24 00:58:51,876 [INFO]: Total import time for itunes20170913: 0:00:00.00
2017-09-24 00:58:51,876 [WARNING]: The following files encountered errors and were not imported:
application
2017-09-24 00:58:51,876 [WARNING]: The following files encountered errors and were not imported:
itunes20170913/['application']
2017-09-24 00:58:51,876 [INFO]: Total import time for all directories: 0:00:00.00
I don't know where the literal '2074265\x02' comes from. Is it from the application file? Do I need to specify the record and field delimiters? Or is it the case that the default values are sufficient?
I don't know why but removing -f solves the problem. The correct command should be:
./EPFImporter.py /mnt/c/Users/vic4ever/Downloads/application/itunes20170913
Related
I am running Ubuntu 16.04 with Xilinx Petalinux 2018.03 SDK. After a number of successful compilations I am now facing this error
$ petalinux-build
[INFO] building project
[INFO] sourcing bitbake
ERROR: Failed to source bitbake
ERROR: Failed to build project
How can I solved this issue?
Another reason to get the errors "ERROR: Failed to source bitbake" as well as "ERROR: Failed to build project" is a possible upgrade of Python on the build machine. The Petalinux SDK requires python v2 (>= 2.7.3) for the 2018.3 edition.
You can check under [YOUR_PROJECT]/build/build.log and you might see a log similar to this one below:
[INFO] building project
[INFO] sourcing bitbake
SDK environment now set up; additionally you may now run devtool to perform development tasks.
Run devtool --help for further details.
OpenEmbedded requires 'python' to be python v2 (>= 2.7.3), not python v3.
Please set up python v2 as your default 'python' interpreter.
ERROR: Failed to source bitbake
ERROR: Failed to build project
To remedy this issue remove the symbolic link under /usr/bin and make sure to create a new one that is pointing to Python 2.7:
sudo rm /usr/bin/python
sudo ln -s /usr/bin/python2.7 /usr/bin/python
First you need to investigate the error a little further, do this:
source /opt/pkg/petalinux/2018.3/settings.sh
It will return something similar to this below:
PetaLinux environment set to '/opt/pkg/petalinux/2018.3'
INFO: Checking free disk space
INFO: Checking installed tools
INFO: Checking installed development libraries
INFO: Checking network and other services
Source the environment setup:
source /opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/environment-setup-aarch64-xilinx-linux
followed by:
devtool --help
In my case I can see more about the actual error:
NOTE: Starting bitbake server...
ERROR: Unable to start bitbake server
ERROR: Last 10 lines of server log for this session (/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/bitbake-cookerdaemon.log):
Traceback (most recent call last):
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/daemonize.py", line 77, in createDaemon
function()
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/server/process.py", line 433, in _startServer
self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset)
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/cooker.py", line 178, in __init__
self.configwatcher = pyinotify.WatchManager()
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/pyinotify.py", line 1764, in __init__
raise OSError(err % self._inotify_wrapper.str_errno())
OSError: Cannot initialize new instance of inotify, Errno=Too many open files (EMFILE)
ERROR: Unable to start bitbake server
ERROR: Last 10 lines of server log for this session (/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/bitbake-cookerdaemon.log):
Traceback (most recent call last):
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/daemonize.py", line 77, in createDaemon
function()
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/server/process.py", line 433, in _startServer
self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset)
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/cooker.py", line 178, in __init__
self.configwatcher = pyinotify.WatchManager()
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/pyinotify.py", line 1764, in __init__
raise OSError(err % self._inotify_wrapper.str_errno())
OSError: Cannot initialize new instance of inotify, **Errno=Too many open files (EMFILE)**
This is pointing to the /proc/sys/fs/inotify/max_user_instances that need to be increased. In my case I went from 128 to 256 by doing this:
sudo su
echo 256 > /proc/sys/fs/inotify/max_user_instances
You need to become root with "su" and change the mac_user_instances.
I'm getting the following error when trying to run psycopg2 in a AWS Lambda:
/var/task/functions/../vendored/psycopg2/_psycopg.so: ELF file's phentsize not the expected size: ImportError
Traceback (most recent call last):
File "/var/task/functions/refresh_mv.py", line 64, in execute
session = SessionFactoryGraphQL.get_session(app=item['app'])
File "/var/task/lib/session_factory.py", line 22, in get_session
engine = create_engine(conn_string, poolclass=NullPool)
File "/var/task/functions/../vendored/sqlalchemy/engine/__init__.py", line 387, in create_engine
return strategy.create(*args, **kwargs)
File "/var/task/functions/../vendored/sqlalchemy/engine/strategies.py", line 80, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
File "/var/task/functions/../vendored/sqlalchemy/dialects/postgresql/psycopg2.py", line 554, in dbapi
import psycopg2
File "/var/task/functions/../vendored/psycopg2/__init__.py", line 50, in <module>
from psycopg2._psycopg import ( # noqa
ImportError: /var/task/functions/../vendored/psycopg2/_psycopg.so: ELF file's phentsize not the expected size
The weird thing is: everything was working fine until yesterday (for more than 5 months), and suddenly stopped working. None of the libraries has been updated.
I tried to build from scratch, as in https://github.com/jkehler/awslambda-psycopg2, but still having the same error.
Can someone help me with it?
The problem is in the latest version of serverless framework. I assume that you are using serverless to deploy your lambda function.
serverless remove
npm install serverless#1.20.2 -g
This should work.
In few words:
MySQL Workbench does not loading plugins in unknown reason;
More detailed:
At application start log file contains a lot of errors:
17:59:51 [INF][ WBContext]: WbContext::init
17:59:51 [ERR][ python]: Error importing Python module /usr/lib/mysql-workbench/modules/migration_grt.py
17:59:51 [ERR][ python]: Traceback (most recent call last):
17:59:51 [ERR][ python]: File "/usr/lib/mysql-workbench/modules/migration_grt.py", line 23, in <module>
17:59:51 [ERR][ python]: import migration_main
17:59:51 [ERR][ python]: File "/usr/lib/mysql-workbench/modules/migration_main.py", line 26, in <module>
17:59:51 [ERR][ python]: import migration
17:59:51 [ERR][ python]: File "/usr/lib/mysql-workbench/modules/migration.py", line 24, in <module>
17:59:51 [ERR][ python]: from workbench.log import log_debug
17:59:51 [ERR][ python]: ImportError: No module named log
....
and
17:59:52 [WRN][ Command]: Plugin item wb.db.copy.open was not found
17:59:52 [WRN][ Command]: Plugin item wb.migration.open was not found
17:59:52 [WRN][ Command]: Plugin item wb.migration.showTypeMapEditor was not found
17:59:52 [WRN][ Command]: Plugin item wb.tools.backupConnections was not found...
...
When I start a new connection to the database and select some schema I have no anymore items in context menu like Drop schema/table, Select rows with some limit, Copy to clipboard and so on.
Clicking by info icon gives me popup window with text: Module SQLIDEUtils not found.
plugins and modules folders are exists on my machine:
> ls /usr/share/mysql-workbench/
data extras images modules mysqlwbmeb.py sshtunnel.py
diagram_size_form.glade find.glade input_dialog.glade mysql.profiles script_templates sys
diagram_view.glade firewall libraries mysql_system_status_rmt.vbs shell_snippets.py.txt wb.glade
embedded_find.glade grt model_view.glade mysql_system_status.vbs snippets workbench.rc
==Versions==
> uname -a
Linux bender 3.19.0-15-generic #15-Ubuntu SMP Thu Apr 16 23:32:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
==Log file parts==
18:18:02 [INF][ WBContext UI]: Initializing workbench context UI with these values:
base dir: /usr/share/mysql-workbench
plugin path: /usr/lib/mysql-workbench/plugins
struct path: /usr/share/mysql-workbench/grt
module path: /usr/lib/mysql-workbench/modules
library path: /usr/share/mysql-workbench/libraries
user data dir: /home/alex/.mysql/workbench
open at start:
open type:
run at startup:
run type:
Force SW rendering: No
Force OpenGL: No
quit when done: No
...
18:20:09 [INF][ WBContext]: System info:
MySQL Workbench Community (GPL) for Linux/Unix version 6.3.4 revision 0 build 828 (64 bit)
Configuration Directory: /home/alex/.mysql/workbench
Data Directory: /usr/share/mysql-workbench
Cairo Version: 1.14.2
OS: Linux 3.19.0-15-generic
CPU: 3x AMD Athlon(tm) II X3 450 Processor (3200.000MHz) - 7.80GiB RAM
Distribution: Ubuntu 15.04
Fips mode enabled: no
You won't believe it. There was installed python package workbench with which mysql-workbench was conflicted.
I'm brand new to Python programming and trying to get myself a functional base from which I can run things like the IPython Notebook which looks pretty exciting.
Thus far I have both Python 2.7 and 3.3 from python.org installed in OS X 10.6 (Snow Leopard) as well as ActiveTcl 8.5.13. Almost everything that I've tried thus far works as expected. I'm focused on learning 3.3, but want to have the option of using 2.7 too. I read up in several documents that I need to start gaining access to PyPI packages using a Python package manager and that distribute is the one I should use for 3k. So I installed that according to the documentation I found and it seemed to work fine.
I also installed pip as directed, and a number of others.
At this point, I have:
$ pip freeze
distribute==0.6.34
ipython==0.13.1
nose==1.2.1 (installed after IPython)
pexpect==2.4 (installed after IPython)
pyflakes3k==0.4.3
readline==6.2.4.1 (installed after IPython)
At this point, I'm doing this from ipython.org guidance
And when I did $ easy_install pexpect, I got a bunch of errors:
$ easy_install pexpect
Searching for pexpect
Reading http://pypi.python.org/simple/pexpect/
Reading http://pexpect.sourceforge.net/
Reading http://sourceforge.net/project/showfiles.php?group_id=59762
Best match: pexpect 2.4
Downloading http://pypi.python.org/packages/source/p/pexpect/pexpect-2.4.tar.gz#md5=fe82d69be19ec96d3a6650af947d5665
Processing pexpect-2.4.tar.gz
Writing /var/folders/td/td0Sh8EfGFuMCnKex1v+q++++TI/-Tmp-/easy_install-s4dtyy/pexpect-2.4/setup.cfg
Running pexpect-2.4/setup.py -q bdist_egg --dist-dir /var/folders/td/td0Sh8EfGFuMCnKex1v+q++++TI/-Tmp-/easy_install-s4dtyy/pexpect-2.4/egg-dist-tmp-5h5cg4
File "build/bdist.macosx-10.6-intel/egg/fdpexpect.py", line 36
raise ExceptionPexpect, 'The fd argument is not a valid file descriptor.'
^
SyntaxError: invalid syntax
File "build/bdist.macosx-10.6-intel/egg/FSM.py", line 77
return `self.value`
^
SyntaxError: invalid syntax
File "build/bdist.macosx-10.6-intel/egg/pexpect.py", line 82
except ImportError, e:
^
SyntaxError: invalid syntax
zip_safe flag not set; analyzing archive contents...
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/pexpect-2.4-py3.3.egg/fdpexpect.py", line 36
raise ExceptionPexpect, 'The fd argument is not a valid file descriptor.'
^
SyntaxError: invalid syntax
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/pexpect-2.4-py3.3.egg/FSM.py", line 77
return `self.value`
^
SyntaxError: invalid syntax
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/pexpect-2.4-py3.3.egg/pexpect.py", line 82
except ImportError, e:
^
SyntaxError: invalid syntax
Adding pexpect 2.4 to easy-install.pth file
Installed /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/pexpect-2.4-py3.3.egg
Processing dependencies for pexpect
Finished processing dependencies for pexpect
That looks bad to me (although I don't yet have the expertise to really interpret it), and so I'm not sure if I have a complete install of pexpect.
After installing nose (before pexpect as per URL above), I tried running iptest and iptest3 from the command line, and both failed to find the command, but after I did easy_install ipython again (after nose), I noticed that this install added iptest3 (as well as ipcluster3 and a few other scripts) to my path, and now my bash shell can find iptest3, but when I run it, I get some more bad-looking output:
$ iptest3
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.3/bin/iptest3", line 9, in <module>
load_entry_point('ipython==0.13.1', 'console_scripts', 'iptest3')()
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/distribute-0.6.34-py3.3.egg/pkg_resources.py", line 343, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/distribute-0.6.34-py3.3.egg/pkg_resources.py", line 2308, in load_entry_point
return ep.load()
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/distribute-0.6.34-py3.3.egg/pkg_resources.py", line 2014, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/IPython/__init__.py", line 43, in <module>
from .config.loader import Config
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/IPython/config/__init__.py", line 16, in <module>
from .application import *
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/IPython/config/application.py", line 31, in <module>
from IPython.config.configurable import SingletonConfigurable
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/IPython/config/configurable.py", line 26, in <module>
from .loader import Config
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/IPython/config/loader.py", line 27, in <module>
from IPython.utils.path import filefind, get_ipython_dir
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/IPython/utils/path.py", line 25, in <module>
from IPython.utils.process import system
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/IPython/utils/process.py", line 27, in <module>
from ._process_posix import _find_cmd, system, getoutput, arg_split
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/IPython/utils/_process_posix.py", line 22, in <module>
from IPython.external import pexpect
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/IPython/external/pexpect/__init__.py", line 2, in <module>
import pexpect
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/pexpect-2.4-py3.3.egg/pexpect.py", line 82
except ImportError, e:
^
SyntaxError: invalid syntax
After doing all that, I noted that my /Library/Frameworks/Python.framework/Versions/Current had been pointing to 2.7, and I guessed that that might be related to my problems and changed the symbolic link to point to 3.3, but iptest3 still fails with the error above.
Any other thoughts on what to do to fix this? It's clear that iptest is pretty important to doing anything else (like IPython Notebook) I want to do.
There is a py3-compatible fork of pexpect called pexpect-u (the u is for unicode, the main difference between the two). You need this to run the pexpect-based parts of IPython on Python 3.
Should be a simple
pip install pexpect-u
side note: pexpect-u is by IPython developer Thomas Kluyver, who did most of the heavy lifting bringing py3 compatibility to IPython.
I am working on Python plugins for QGIS. I set my variables as
PATH :=C:\OSGeo4W\apps\qgis;%PATH%
PYTHONPATH:=C:\OSGeo4W\apps\qgis\python
But when i try to run my .py file in IDLE i gets error saying:
Traceback (most recent call last):
File "C:\rt_sql_layer_working\DlgQueryBuilder.py", line 30, in
from qgis.core import *
ImportError: DLL load failed: The specified module could not be found.
what i should set for PATH variable??