Skip to content

Issue with relative import from no known package #106

@ericshear26

Description

@ericshear26

I'm still working on the same project. To give myself a better understanding of how pySerialTransfer and SerialTransfer.h work, I'm running each example in the documentation. I am using tx_data.py with rx_data.ino and rx_data.py with tx_data.ino. Every time I run rx_data or tx_data on Python, I get this error:

(base) Eric@CHE-NAR-2G5L2C0 ~ % /usr/local/bin/python3 "/Users/Eric/Desktop/Dissertation/Codes & Scripts/Python/rx_data.py"
Traceback (most recent call last):
File "/Users/Eric/Desktop/Dissertation/Codes & Scripts/Python/rx_data.py", line 2, in
from pySerialTransfer import pySerialTransfer as txfer
File "/Users/Eric/Desktop/Dissertation/Codes & Scripts/Python/pySerialTransfer.py", line 11, in
from .CRC import CRC
ImportError: attempted relative import with no known parent package

This happened even though I copied & pasted both pySerialTransfer.py and CRC.py to the same folder where I'm running the rx and tx files. I also tried removing the "." in .CRC, to no avail.

I'm not sure what's wrong.

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