Skip to content

Attribute Error: AFBufferOption, tried venv, also local download how fix? #713

@arthurpalayer

Description

@arthurpalayer

Bug report

Description

cannot import PIconnect, can connect to PI servers through PI process book, but not through python. No admin privileges.

To Reproduce

$python

import piconnect

Expected behavior

Can connect to PI servers through Python and import data

Possible solutions

getting admin rights possibly? This same error occured when could not connect to PI Processbook, but can now connect to PI Processbook and no longer to PIconnect.

Screenshots

OSIsoft(r) AF SDK Version: 2.5.2.5396
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\myusername\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\PIconnect_init_.py", line 7, in
from PIconnect.PI import PIServer
File "C:\Users\myusername\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\PIconnect\PI.py", line 8, in
import PIconnect.PIPoint as PIPoint_
File "C:\Users\myusername\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\PIconnect\PIPoint.py", line 4, in
from PIconnect import AF, PIConsts, PIData, _time
File "C:\Users\myusername\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\PIconnect\PIData.py", line 56, in
class PISeriesContainer(abc.ABC):
File "C:\Users\myusername\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\PIconnect\PIData.py", line 595, in PISeriesContainer
buffer_mode: AF.Data.AFBufferOption,
^^^^^^^^^^^^^^^^^^^^^^
AttributeError: AFBufferOption

System

  • OS: \Windows
  • Python version: 3.11 (also tested 2.9)
  • PIconnect version: most recent 0.10.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions