Python API no attribute Session
See original GitHub issueFollowing the querybind example I impoort the BaseXClient and then need to connect the session
# create session session = BaseXClient.Session('localhost', 1984, 'admin', 'admin')
When I attempt to connect the session error returned that BaseXClient has no attribute Session
session = BaseXClient.Session(‘localhost’, 1984, ‘admin’, ‘admin’)
AttributeErrorTraceback (most recent call last)
<ipython-input-6-272a3e1022b0> in <module>()
----> 1 session = BaseXClient.Session('localhost', 1984, 'admin', 'admin')
AttributeError: module 'BaseXClient' has no attribute 'Session'
and system info included
Sayth@renshaw-laptop ~
λ python
Python 3.5.2 |Anaconda 4.1.1 (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import BaseXClient
>>> session = BaseXClient.Session('localhost', 1984, 'admin', 'admin')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'BaseXClient' has no attribute 'Session'
>>>
Issue Analytics
- State:
- Created 7 years ago
- Comments:16 (9 by maintainers)
Top Results From Across the Web
AttributeError: 'API' object has no attribute 'session'
Using Version: 0.117.0 of instabot. Already being logged in I run: from instabot import Bot insta = Bot() insta.upload_photo(photo_path,caption ...
Read more >AttributeError: module 'requests.api' has no attribute 'Session'
AttributeError: module 'requests. api' has no attribute 'Session'" · Issue #46 · python-cas/python-cas · GitHub.
Read more >Module 'TensorFlow' Has No Attribute 'session' - Python Guides
Reason: The possible reason for this error is that the tf. session() attribute is not available in Tensorflow's latest version (TensorFlow2.
Read more >TensorFlow 2.0 has no attribute session - RoseIndia.Net
Today we will see the main reason behind the "TensorFlow 2.0 has no attribute session" error in TensorFlow and also see what can...
Read more >SessionAttr.create - Python API - Zato
Creates a new session attribute, optionally encrypting it before it is ... to set expiry for an attribute, upon reaching of which the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@MortalCatalyst try to use following import statement:
from BaseXClient import BaseXClient
Part of the confusion is if you pip install
BaseXClient
you have a package calledBaseXClient
with a module inside it calledBaseXClient
. If you’re inside the source treeimport BaseXClient
is importing the module (in the fileBaseXClient.py
) not the package.One way to solve the problem would be to move
BaseXClient.py
into aBaseXClient
directory (with a__init__.py
in it to make it a package. That way, from the directory with the examples,import BaseXClient
would import the package, just like it does when pip install.