alhoo / jf Goto Github PK
View Code? Open in Web Editor NEWJSONL and YAML query tool
Home Page: https://pypi.python.org/pypi/jf
License: MIT License
JSONL and YAML query tool
Home Page: https://pypi.python.org/pypi/jf
License: MIT License
Traceback (most recent call last):
File "bin/jf", line 11, in <module>
sys.exit(main())
File "jf/__main__.py", line 122, in main
print_results(data, args)
File "lib/python3.5/site-packages/jf/output.py", line 45, in print_results
out = json.loads(json.dumps(out.data, cls=StructEncoder),
AttributeError: 'str' object has no attribute 'data'
Use pandas or tablib to import / export data from/to csv, xlsx or xml files.
ipython doesn't work nicely when we pipe data to jf.
Please find below details. Looks like it is related to apple m1 related issue.
(venv) ➜ User ### OS VERSION ###
(venv) ➜ User sw_vers
ProductName: macOS
ProductVersion: 12.3
BuildVersion: 21E230
(venv) ➜ User
(venv) ➜ User ### KERNEL & CPU ###
(venv) ➜ User uname -a
Darwin <hostname> 21.4.0 Darwin Kernel Version 21.4.0: Mon Feb 21 20:35:58 PST 2022; root:xnu-8020.101.4~2/RELEASE_ARM64_T6000 arm64
(venv) ➜ User
(venv) ➜ User ### PYTHON VERSION ###
(venv) ➜ User python --version
Python 3.9.12
(venv) ➜ User
(venv) ➜ User ### CLANG VERSION ###
(venv) ➜ User clang --version
Apple clang version 13.1.6 (clang-1316.0.21.2)
Target: arm64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
(venv) ➜ User
(venv) ➜ User ### ATTEPMT TO INSTALL jf ###
(venv) ➜ User python -m pip install jf
Collecting jf
Using cached jf-1.1.2.tar.gz (17 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: pygments>=2.4.0 in /private/tmp/jqtest/venv/lib/python3.9/site-packages (from jf) (2.12.0)
Requirement already satisfied: regex>=2016.3.2 in /private/tmp/jqtest/venv/lib/python3.9/site-packages (from jf) (2022.3.2)
Requirement already satisfied: python-dateutil>=2.4.1 in /private/tmp/jqtest/venv/lib/python3.9/site-packages (from jf) (2.8.2)
Requirement already satisfied: ruamel.yaml>=0.16.10 in /private/tmp/jqtest/venv/lib/python3.9/site-packages (from jf) (0.17.21)
Requirement already satisfied: dateparser>=0.6.0 in /private/tmp/jqtest/venv/lib/python3.9/site-packages (from jf) (1.1.1)
Requirement already satisfied: pandas>=0.22.0 in /private/tmp/jqtest/venv/lib/python3.9/site-packages (from jf) (1.4.2)
Requirement already satisfied: Click>=7.0.0 in /private/tmp/jqtest/venv/lib/python3.9/site-packages (from jf) (8.1.3)
Requirement already satisfied: tzlocal in /private/tmp/jqtest/venv/lib/python3.9/site-packages (from dateparser>=0.6.0->jf) (4.2)
Requirement already satisfied: pytz in /private/tmp/jqtest/venv/lib/python3.9/site-packages (from dateparser>=0.6.0->jf) (2022.1)
Requirement already satisfied: numpy>=1.20.0 in /private/tmp/jqtest/venv/lib/python3.9/site-packages (from pandas>=0.22.0->jf) (1.22.3)
Requirement already satisfied: six>=1.5 in /private/tmp/jqtest/venv/lib/python3.9/site-packages (from python-dateutil>=2.4.1->jf) (1.16.0)
Requirement already satisfied: ruamel.yaml.clib>=0.2.6 in /private/tmp/jqtest/venv/lib/python3.9/site-packages (from ruamel.yaml>=0.16.10->jf) (0.2.6)
Requirement already satisfied: pytz-deprecation-shim in /private/tmp/jqtest/venv/lib/python3.9/site-packages (from tzlocal->dateparser>=0.6.0->jf) (0.1.0.post0)
Requirement already satisfied: tzdata in /private/tmp/jqtest/venv/lib/python3.9/site-packages (from pytz-deprecation-shim->tzlocal->dateparser>=0.6.0->jf) (2022.1)
Using legacy 'setup.py install' for jf, since package 'wheel' is not installed.
Installing collected packages: jf
Running setup.py install for jf ... error
error: subprocess-exited-with-error
× Running setup.py install for jf did not run successfully.
│ exit code: 1
╰─> [25 lines of output]
/private/tmp/jqtest/venv/lib/python3.9/site-packages/setuptools/dist.py:739: UserWarning: Usage of dash-seted 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
running install
/private/tmp/jqtest/venv/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.macosx-12-arm64-3.9
creating build/lib.macosx-12-arm64-3.9/jf
copying jf/query_parser.py -> build/lib.macosx-12-arm64-3.9/jf
copying jf/__init__.py -> build/lib.macosx-12-arm64-3.9/jf
copying jf/extra_functions.py -> build/lib.macosx-12-arm64-3.9/jf
copying jf/process.py -> build/lib.macosx-12-arm64-3.9/jf
copying jf/main.py -> build/lib.macosx-12-arm64-3.9/jf
copying jf/__main__.py -> build/lib.macosx-12-arm64-3.9/jf
copying jf/jfio.py -> build/lib.macosx-12-arm64-3.9/jf
copying jf/meta.py -> build/lib.macosx-12-arm64-3.9/jf
running build_ext
building 'jf.jsonlgen' extension
creating build/temp.macosx-12-arm64-3.9
creating build/temp.macosx-12-arm64-3.9/jf
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -I/private/tmp/jqtest/venv/include -I/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c jf/jsonlgen.cc -o build/temp.macosx-12-arm64-3.9/jf/jsonlgen.o -std=c++11 -O3 -funroll-loops -march=native -fPIC
clang: error: the clang compiler does not support '-march=native'
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> jf
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
use python multithreading threadpool to map/filter data in parallel.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.