Closed jmjamison closed 3 years ago
I have tested out locally
df.get()
and
import pyDataverse
from pyDataverse.api import NativeApi
Both work. My first guess is, that this may has something to do with virtual environment setup or general package installation.
Maybe you want to try out to create a virtual env, download latest pyDataverse and test the code above inside the venv.
e.g.
mkdir test_venv
cd test_venv
python3 -m venv .venv
source .venv/bin/activate
pip install pyDataverse
I assumed the error was mine not pyDataverse - that's why I originally posted in the dataverse google group. I'll work on your suggestion and reply back when I figure out what I did to mess up my environment. (I can't be the only newbie with this sort of problem.)
I'm closing the issue because this is a user/environment issue not a pyDataverse issue.
@jmjamison : You do not have to close the issue, as it is so far not verified, what the problem is. But you could also re-open it, when the issue is related to pyDataverse. As you wish.
The problem was my environment. I have python installed and Anaconda (which I use for work). The problem was that I somehow hadn't updated the pyDataverse in my Anaconda environment. Replaced it manually and everything is working perfectly.
I added a note on github that the problem was indeed a user/environment problem. My original python had been updated correctly but the Anaconda distribution (use that for work) had not. I updated that version manually and everything work perfectly.
Jamie
UCLA Library Data Science Center jamison@library.ucla.edu 310-825-0716
"An asset is only an asset if you can access it ..." AMIA (Association of Moving Image Archivists)/Digital Asset Symposium 2008
From: Stefan Kasberger notifications@github.com Sent: Thursday, February 25, 2021 11:04 AM To: gdcc/pyDataverse Cc: Jamison, Jamie; Mention Subject: Re: [gdcc/pyDataverse] pyDataverse AttributeError: 'Datafile' object has no attribute 'get' (#113)
@jmjamisonhttps://github.com/jmjamison : You do not have to close the issue, as it is so far not verified, what the problem is. But you could also re-open it, when the issue is related to pyDataverse. As you wish.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/gdcc/pyDataverse/issues/113#issuecomment-786131999, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AABYCOIAYPNLMKYBS6BRCRTTA2NNXANCNFSM4YFCZMIQ.
Before we can start
Before moving on, please check some things first:
pip freeze
). output from pip freeze: pyDataverse==0.3.0 With anaconda3 it was a bit harder to verify this but I'm sure that I hae the lastest versionIssue
I'm working on test code to be able to upload files to a dataset. One of our LiDAR datasets has some 2,000 files so I'd like to add batches of files programmatically. This is some of my test code as I'm learning to work with pyDataverse.
This was in a jupyter notebook
Just incase the problem was with anaconda, I ran this in the python 3.5.1 IDLE and wing7
Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:38:48) [MSC v.1900 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information.
This is from win7 which leads me to wonder if I'm somehow pulling in the wrong api - so the problem may be something I'm doing not pyDataverse.
Thank you, Jamie Jamison