I am now using Python to download files from Dropbox, and I following this tutorial. However, it did not succeed on the first two lines of codes:
import dropbox
dbx = dropbox.Dropbox('YOUR_ACCESS_TOKEN')
My Python complains that AttributeError: 'module' object has no attribute 'Dropbox' Any ideas?
After careful examination, I found the reason is because I am using functions from dropbox-v2 while in my machine dropbox-v1 was installed.
Related
Trying to implement ytini (yt for Houdini) Python framework.
http://www.ytini.com/
Resolved most install erros but am still getting the following when I load a datfile
Not sure if this might be related to some configuration for ytini or if its more of a Python specific error.
Traceback (most recent call last): File "", line 14,
in File "/home/jim/.local/lib/python2.7/site-packages/yt/__init__.py", line 44,
in import yt.utilities.physical_constants as physical_constants
AttributeError: 'module' object has no attribute 'utilities
Can any Python experts suggest any troubleshooting steps?
Update>
If I simply do an import yt I get the following error
Warning! HDF5 library version mismatched error
The HDF5 header files used to compile this application do not match
the version used by the HDF5 library to which this application is linked.
Data corruption or segmentation faults may occur if the application continues.
This can happen when an application was compiled by one version of HDF5 but
linked with a different version of static or shared HDF5 library.
You should recompile the application or check your shared library related
settings such as 'LD_LIBRARY_PATH'.
'HDF5_DISABLE_VERSION_CHECK' environment variable is set to 1, application will
continue at your own risk.
Headers are 1.10.0, library is 1.8.11
This error means that you are treating yt.utilities as an object from which you are trying to access the object attribute physical constants, which is correct, but python thinks that this attribute doesn't exist. However, I am unable to reproduce this error and can access the values stored therein. What else is in your code? It looks like you are accessing another module function of yt which uses the constants attributes, is that correct? Also, are you using python 2.7 or 3.x?
In terms of installing package in 2 different places, I've had this happen before which was very frustrating, but the folders can be found by doing a folder search for the module name and should return all versions saved in different locations. The exact location of the modules varies with IDE, OS, weather...
Hi I am kind of new to coding, I would like to make a small program that will upload my file to dropbox. I use python 3.5.2 and pycharm.
I followed the tutorial online.
1. pip install dropbox
2. copy and paste the link
3. execute
4. I got the following error
AttributeError: module 'dropbox' has no attribute 'Dropbox'
Any one know what to do in this situation? I been googling for a while, but couldn't come up with answers. Most I saw is the code for api V1
Following is my code
import dropbox
dbx = dropbox.Dropbox('mytoken')
dbx.users_get_current_account()
Tutorial I followed https://www.dropbox.com/developers/documentation/python#tutorial
I just installed Zipline on Windows 10, Python 2.7 system using conda. When I tried to use a function fetch_csv from zipline.api, I get an error
AttributeError: 'NoneType' object has no attribute 'fetch_csv'
Why can't I load the function fetch_csv?
from zipline.api import fetch_csv
fetch_csv('./test.csv')
The Zipline API reference says that this methods is to "Fetch a csv from a remote url". For local files, I would suggest pandas:
pandas.read_csv('./test.csv')
I'm working with the google-api-python-client library with the following setup:
Python3.4.3 in a virtual environment (using pip8.1.1)
I'm getting error from the following code: AttributeError: 'module' object has no attribute 'file'
store = oauth2client.file.Storage(credential_path)
The code is from the Google Python Quickstart example and runs fine under Python 2.7.10
Thanks in advance!
I was able to get it to work by rewriting the import statement:
from oauth2client.file import Storage
Not sure why this works, but it does.
I am currently attempting to use the cex.io Python API for accessing financial data. Here is a link to github with the library: https://github.com/matveyco/cex.io-api-python
I installed it on MacOS X by using "python setup.py install" in Terminal. In the link above, it says to initialize the class we should use the following:
import cexapi
api = cexapi.api(username, api_key, api_secret)
However, when I put this code in a .py file in a directory without any other files, bash responds with:
AttributeError: 'module' object has no attribute 'api'
I am pretty sure the library is correctly installed (Python has no problem importing cexapi). It is clear to me that there is something about Python objects that I don't understand or I must have incorrectly installed the module.
Just in case it helps, I ran the following in the Python interpreter:
import cexapi
cexapi.__file__
And got the following:
'/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/cexapi-0.1-py3.4.egg/cexapi/__init__.py'
This command should show where the module is stored. Any help would be greatly appreciated, as I need to use this API. Thanks.
use upper case letters:
import cexapi
api = cexapi.API(username, api_key, api_secret)