Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import crash related to #113 #114

Closed
jhhcs opened this issue Aug 4, 2022 · 2 comments
Closed

Import crash related to #113 #114

jhhcs opened this issue Aug 4, 2022 · 2 comments

Comments

@jhhcs
Copy link

jhhcs commented Aug 4, 2022

Unfortunately, the fix for #113 seems to have introduced another issue that appears when PyPCAPKit is used in a Python 3.7 environment. The following is on Python 3.7.0, Windows 10, CPython:

Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 7.34.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import pcapkit
Traceback (most recent call last):

  File "X:\test\venv\lib\site-packages\IPython\core\interactiveshell.py", line 3553, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)

  File "<ipython-input-2-fdafce80c9fe>", line 1, in <module>
    import pcapkit

  File "X:\test\venv\lib\site-packages\pcapkit\__init__.py", line 83, in <module>
    from pcapkit.foundation.registry import *

  File "X:\test\venv\lib\site-packages\pcapkit\foundation\__init__.py", line 13, in <module>
    from pcapkit.foundation.extraction import Extractor

  File "X:\test\venv\lib\site-packages\pcapkit\foundation\extraction.py", line 424
    if (parent := os.path.split(fout)[0]):
               ^
SyntaxError: invalid syntax
@JarryShaw JarryShaw added the bug label Aug 5, 2022
JarryShaw added a commit that referenced this issue Aug 20, 2022
@JarryShaw
Copy link
Owner

I'm still working on a solution to resolve the installation time back-compiling integration with pybpc and setuptools. At the moment, please consider using the following steps to resolve the issue:

  1. install python-walrus into the same virtual environment
  2. run walrus --no-archive X:\test\venv\lib\site-packages\pcapkit in the virtual environment

This will manually convert the assignment expressions used in the project and make it compliant with older grammars.

@JarryShaw
Copy link
Owner

Should've been fixed in version 0.16.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants