Comments (10)
I'll get to test this out this week.
from nodb.
can you tell me more about your environment?
from nodb.
Sure:
Debian GNU/Linux 9.11 (stretch)
Linux penguin 4.19.79-07511-ge32b3719f26b #1 SMP PREEMPT Mon Nov 18 17:41:41 PST 2019 x86_64 GNU/Linux
Python 3.6.9 and pipenv for virrual environment
pip freeze
appdirs==1.4.3
attrs==19.3.0
aurora-data-api==0.2.0
backcall==0.1.0
bleach==3.1.1
boto3==1.12.8
botocore==1.15.8
coverage==4.3.4
decorator==4.4.1
defusedxml==0.6.0
docutils==0.15.2
entrypoints==0.3
et-xmlfile==1.0.1
funcsigs==1.0.2
future==0.18.2
futures==3.0.5
-e [email protected]:dschofield/goldmine.git@8ba011b3ad4fdf0e77303773547e2a24b410e5a7#egg=goldmine
importlib-metadata==1.5.0
ipykernel==5.1.4
ipython==7.12.0
ipython-genutils==0.2.0
ipywidgets==7.5.1
jdcal==1.4.1
jedi==0.16.0
Jinja2==2.11.1
jmespath==0.9.5
jsonschema==3.2.0
jupyter==1.0.0
jupyter-client==6.0.0
jupyter-console==6.1.0
jupyter-core==4.6.3
MarkupSafe==1.1.1
mistune==0.8.4
nbconvert==5.6.1
nbformat==5.0.4
nodb==0.4.0 ## !! installed from 0.5.1 tag !!
nose==1.3.7
notebook==6.0.3
numpy==1.18.1
openpyxl==3.0.3
packaging==20.1
pandas==1.0.1
pandocfilters==1.4.2
parso==0.6.2
pbr==5.4.4
pexpect==4.8.0
pickleshare==0.7.5
prometheus-client==0.7.1
prompt-toolkit==3.0.3
ptyprocess==0.6.0
PyAthena==1.10.1
Pygments==2.5.2
pyparsing==2.4.6
pyrsistent==0.15.7
python-dateutil==2.8.1
pytz==2019.3
pyzmq==19.0.0
qtconsole==4.6.0
s3transfer==0.3.3
Send2Trash==1.5.0
six==1.14.0
tenacity==6.1.0
terminado==0.8.3
testpath==0.4.4
tornado==6.0.3
traitlets==4.3.3
urllib3==1.25.8
wcwidth==0.1.8
webencodings==0.5.1
widgetsnbextension==3.5.1
xlrd==1.2.0
zipp==3.0.0`
from nodb.
seems to be issues with python3.6 specifically, i'm working through getting the tests functional again.
from nodb.
so i've got the tests working again, however i'm not sure if it will solve the issue.
is this an issue when there is no data to return?
from nodb.
Sorry this took me so long...no dice.
Following the documented example.
acache.save({"name": "Kat", "age": 19})
True
acache.load('Kat')
{'name': 'Kat', 'age': 19}
acache.all()
---------------------------------------------------------------------------
UnicodeDecodeError Traceback (most recent call last)
<ipython-input-24-76b88c7ca4c0> in <module>
----> 1 acache.all()
~/.local/share/virtualenvs/goldmine-hCKJOvFR/lib/python3.6/site-packages/nodb/__init__.py in all(self, metainfo)
200 serialized = obj.get()["Body"].read()
201 # deserialize and add to list
--> 202 deserialized_objects.append(self._deserialize(serialized))
203
204 # sort by insert datetime
~/.local/share/virtualenvs/goldmine-hCKJOvFR/lib/python3.6/site-packages/nodb/__init__.py in _deserialize(self, serialized)
249 obj = None
250 if type(serialized) == bytes:
--> 251 serialized = serialized.decode()
252 deserialized = json.loads(serialized)
253 return_me = {}
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte
The same object (successfully) deserialized by .load() doesn't try to decode bytes.
from nodb.
can you paste the whole process?
from nodb.
@dschofield, it might be that you created this bucket with an older version of nodb, and so there might be legacy items in the bucket, are you able to check the bucket is empty before you start testing ?
from nodb.
Magically, it's working just fine now. Thanks!
`from nodb import NoDB
nodb = NoDB('goldmine-assets', profile_name='mdg')
nodb.index='name'
a_user={'name': 'David', 'age': 53}
b_user={'name':'Kat', 'age':47}
nodb.save(a_user)
True
nodb.load('David')
{'name': 'David', 'age': 53}
nodb.save(b_user)
True
nodb.load('Kat')
{'name': 'Kat', 'age': 47}
nodb.all()
[{'name': 'David', 'age': 53}, {'name': 'Kat', 'age': 47}]
`
from nodb.
should probably write a test to determine if that will be an issue
from nodb.
Related Issues (20)
- Outdated Requirements HOT 1
- Delete doesn't invalidate the cache HOT 2
- S3 Select support HOT 5
- Use generic cloud storage API
- Publish latest versions to PyPI HOT 4
- Compatibility warnings HOT 3
- Error using NoDB on python3 HOT 14
- Potential dependency conflicts between NoDB and botocore HOT 3
- README.md is out of date with master branch HOT 1
- setting the bucket via an attribute fails HOT 1
- .all() not working HOT 2
- zappa.io domain down HOT 1
- bug HOT 1
- Deletion of Objects
- .all() HOT 2
- there is no How To connect with amazon credentials HOT 4
- Authorization problem for fresh AWS regions HOT 4
- Test error HOT 4
- Divide classes in __init__
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodb.