Comments (16)
Are you using a Mac? This sounds similar to issue 34, #34
These are the steps that @ChristianTremblay gave me before that fixed it.
It is probably related to some kind of permission of the "system's python" version.
To be able to make it work, you will need to use a virtual env that will isolate you from the system's python.
Here is a simple guide : http://docs.python-guide.org/en/latest/dev/virtualenvs/
You will need to :
sudo pip install virtualenv
mkdir your project folder
cd project
virtualenv venv
source venv/bin/activate
Once you are in your virtual env DO NOT use sudo to pip install.
(in fact, this is the part that made me think of permission issue as I read somewhere that we should never sudo pip install anything)
So now you are in your virtual env (it's in parenthesis in the console) and you
pip install requests
pip install hszinc
pip install pyhaystack
(note that this time you won't see any weird message when trying to install pandas and you need xcode to perform the install....)
You are now able to :
import hszinc
hszinc.MODE_ZINC
from pyhaystack.client.skyspark import SkysparkHaystackSession
from pyhaystack.
from pyhaystack.
pip install hszinc
from pyhaystack.
Does it work if you don't specify the format ?
Also, if using version 0.92 (latest), can you test using
'''
Import pyhaystack
session=pyhaystack.connect("skyspark", uri, user,password)
'''
We may face something related to authentication. The class you are loading isn't meant for Skyspark v3+
Using connect, when specifying "skyspark" the default implementation will use scram authentication.
from pyhaystack.
No, it doesn't.
Checked versions:
pip show pyhaystack
Name: pyhaystack
Version: 0.92
Location: /usr/local/lib/python2.7/site-packages
Requires: requests, setuptools, pandas, parsimonious, iso8601, hszinc, six, fysom, signalslot, semver
pip show hszinc
Name: hszinc
Version: 0.1.1
Location: /usr/local/lib/python2.7/site-packages
Requires: parsimonious, pytz, iso8601, six, pint
Also when I tried the connect() approach I got the following error:
Code:
import pyhaystack
session = pyhaystack.connect(implementation='skyspark',
uri='http://ip',
username='username',
password='password',
project='site'
)
Error:
session = pyhaystack.connect(implementation='skyspark',
AttributeError: 'module' object has no attribute 'connect'
from pyhaystack.
I am testing that on SkySpark version 2.1.15
from pyhaystack.
Humm... AttributeError: 'module' object has no attribute 'connect'
is telling me there is a problem with the install..
Can you uninstall pyhaystack and hszinc then reinstall ?
I've faced that kind of problem before but I thought it was because I was alterning between a local repo and pip install.... anyway.
pip uninstall pyhsyatck
(multiple time until there is no version left on your system)
pip uninstall hszinc
(mutliple time again if needed)
then pip install pyhaytsack
it should install hszinc
from pyhaystack.
did the uninstall and installed pyhaystack
but it has the same errors for both direct and connect approach
from pyhaystack.
from pyhaystack.
tried the sudo and same error
from pyhaystack.
is there any chance that you test it for SkySpark and see if it work ?
from pyhaystack.
I personally don't have access to SkySpark… but my hunch is there's a dependent Python module (of hszinc
) that isn't loading for some reason.
That is why there's an AttributeError
.
from pyhaystack.
I've also had some problem with pip unable to uninstall things... you could also check to update pip :
python -m pip install --upgrade pip
Then uninstall pyhaystack
the attribute error
is not normal as it tells that function connect doesn't exist...
I've just tested a Skyspark v2 connection :
import pyhaystack
session = pyhaystack.connect('skyspark2', uri='http://ip',
username='user',
password='pw',
project = 'myProject')
session.about().result
Please note that implementation for old Skyspark version is skyspark2
and we chose 'skyspark`as the shortcut for v3+ which will probably become the "by default" option anyway.
This also led to a bug discovered with bracket search... guess I'll open an issue and publish a hot fix....
from pyhaystack.
Hi Ron
Worked like a charm, thanks for the help.
I will carry on using the package.
from pyhaystack.
I will add this to our documentation. It will probably help others.
Thanks @ronaldsnyder
from pyhaystack.
Documentation has been updated in develop branch
from pyhaystack.
Related Issues (20)
- Issue with NaN values HOT 3
- Retrieving point write status was broken in 3.0? HOT 6
- Implement __await__ on operation classes HOT 5
- Breaking change from SkySpark 3.0.27 to 3.0.28 HOT 15
- LDAP login on SkySpark 3.0.28 HOT 6
- Axon eval(hisClear) requires POST, not GET with skyspark HOT 2
- Why was the Haystack read Op split into get_entity and find_entity? HOT 2
- hszinc.zincparser.ZincParseException: Failed to parse: Expected end of text, found '"' (line:6, col:1) HOT 2
- Pint error? HOT 3
- Possible error while fetching data from a Niagara server hosted on HTTPS HOT 2
- NaN value in reading history raises exception HOT 19
- function HayStackSession::_get requests zinc when told to get raw json HOT 3
- SkySpark throws error 405 on any GET request HOT 23
- Authentication issue using domain name HOT 5
- Niagara 4.9 | Possible breaking change for login HOT 2
- SkySpark Authentication HOT 3
- Writing histories to SkySpark HOT 4
- Skyspark needs post requests instead of get requests for his_read HOT 12
- Watch_poll does not use argument refresh HOT 2
- Implementation of ability to add new entities? HOT 7
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 pyhaystack.