ambitus / pyzkiln

A set of Python building blocks to help with z/OS automation
Apache License 2.0
9 stars 12 forks source link

Import failure #18

Closed tim-odom closed 2 years ago

tim-odom commented 2 years ago

Can’t import the module on z/os system, there is possibly something with the structure of the package that might need to be updated. This is the error message received.


>>> from pyzkiln_core import display_active_jobs
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/u/ibmuser/.local/lib/python3.9/site-packages/pyzkiln_core/__init__.py", line 11, in <module>
    from pyzkiln_core.zcmds import *
  File "/u/ibmuser/.local/lib/python3.9/site-packages/pyzkiln_core/zcmds/__init__.py", line 5, in <module>
    from pyzkiln_core.zcmds.display_active_jobs import *
  File "/u/ibmuser/.local/lib/python3.9/site-packages/pyzkiln_core/zcmds/display_active_jobs.py", line 2, in <module>
    from zoautil_py import opercmd
  File "/u/ibmuser/.local/lib/python3.9/site-packages/zoautil_py/opercmd.py", line 1, in <module>
    from zoautil_py.core import call_zoau_library
ImportError: CEE3512S An HFS load of module /u/ibmuser/.local/lib/python3.9/site-packages/zoautil_py/core.abi3.so failed. The system return code was 0000000130; the reason code was 0BDF0C27. ```
luisamarti commented 2 years ago

@tim-odom It seems like the problem you are having is related to your ZOAU installation. Please check if ZOAU installation is correct, including all your environment variables. Also make sure you have the latest ZOAU version.

tim-odom commented 2 years ago

@luisamarti I already did that before I made the issue but it didn't change anything. Joe suggested I open the issue for it.

luisamarti commented 2 years ago

@tim-odom can you go into the directory mentioned in the error message , /u/ibmuser/.local/lib/python3.9/site-packages/zoautil_py , issue this command ls -alT , and send us the output

tim-odom commented 2 years ago

@luisamarti

Screen Shot 2022-06-21 at 10 10 42 AM
luisamarti commented 2 years ago

@tim-odom It seems like the file core.abi3.so is tagged incorrectly. Can you change the tag to binary with this commandchtag -b core.abi3.so and try again.

tim-odom commented 2 years ago

@luisamarti that worked but I seem to be getting a different error now that doesn't have any return codes

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/u/ibmuser/.local/lib/python3.9/site-packages/pyzkiln_core/__init__.py", line 11, in <module>
    from pyzkiln_core.zcmds import *
  File "/u/ibmuser/.local/lib/python3.9/site-packages/pyzkiln_core/zcmds/__init__.py", line 5, in <module>
    from pyzkiln_core.zcmds.display_active_jobs import *
  File "/u/ibmuser/.local/lib/python3.9/site-packages/pyzkiln_core/zcmds/display_active_jobs.py", line 2, in <module>
    from zoautil_py import opercmd
  File "/u/ibmuser/.local/lib/python3.9/site-packages/zoautil_py/opercmd.py", line 2, in <module>
    from zoautil_py.datasets import hlq as get_hlq
  File "/u/ibmuser/.local/lib/python3.9/site-packages/zoautil_py/datasets.py", line 8, in <module>
    import logging
  File "/usr/lpp/IBM/cyp/v3r9/pyz/lib/python3.9/logging/__init__.py", line 32, in <module>
    import sys, os, time, io, re, traceback, warnings, weakref, collections.abc
  File "/usr/lpp/IBM/cyp/v3r9/pyz/lib/python3.9/re.py", line 124, in <module>
    import enum
  File "/usr/lpp/IBM/cyp/v3r9/pyz/lib/python3.9/enum.py", line 2, in <module>
    from types import MappingProxyType, DynamicClassAttribute
ImportError: cannot import name 'MappingProxyType' from 'types' (/u/ibmuser/.local/lib/python3.9/site-packages/zoautil_py/types.py)
tim-odom commented 2 years ago

Upgrading to ZOAU 1.2 helped with the issue