petrasvestartas / compas_wood

Project for Timber Joint Generation. Documentation:
https://petrasvestartas.github.io/compas_wood/latest/
MIT License
39 stars 2 forks source link

ModuleNotFoundError: No module named 'data_set_plates' #7

Closed KY2292 closed 7 months ago

KY2292 commented 1 year ago

Describe the bug ModuleNotFoundError: No module named 'data_set_plates'

To Reproduce Steps to reproduce the behavior:

from compas_wood.joinery import joints import data_set_plates from compas_wood.viewer_helpers import display

def test_joints(): input = data_set_plates.ss_24 element_pair_list, joint_areas_polylines, joint_types = joints(input,0) display(input, joint_areas_polylines, None, 0.01,0,0,0, False,joint_types)

Desktop (please complete the following information):

petrasvestartas commented 1 year ago

Hi,

Could you please try the example bellow, and before doing that pull the latest version of compas_wood. There were quite some changes after the videos were recorded. Nevertheless the structure of code is almost the same. The data_set_plates have been changed to avoid hard-coded data-sets and use XML files instead.

All the up-to-date example files are here: https://petrasvestartas.github.io/compas_wood/latest/examples.html#

This is an example for the Annen structure:

from compas_wood.joinery import get_connection_zones
from compas_wood.joinery import closed_mesh_from_polylines
import data_set_plates
from compas_wood.viewer_helpers import display

def test_connection_detection():
    # joinery parameters
    division_length = 300
    joint_parameters = [
        division_length,
        0.5,
        9,
        division_length * 1.5,
        0.65,
        10,
        division_length * 1.5,
        0.5,
        21,
        division_length,
        0.95,
        30,
        division_length,
        0.95,
        40,
        division_length,
        0.95,
        50,
    ]

    # generate joints
    result = get_connection_zones(
        data_set_plates.annen_small_polylines(),
        data_set_plates.annen_small_edge_directions(),
        data_set_plates.annen_small_edge_joints(),
        data_set_plates.annen_small_three_valance_element_indices_and_instruction(),
        None,
        joint_parameters,
    )

    # display
    result_flat_list = [item for sublist in result for item in sublist]
    # display(result_flat_list, None, None, 0.001, 0, 0, 0, False)

    # mesh polylines

    meshes = []
    for i in range(len(result)):
        mesh_result = closed_mesh_from_polylines(result[i])
        meshes.append(mesh_result)
    display(result_flat_list, None, meshes, 0.001, 0, 0, 0, False)

test_connection_detection()

image

nbruscia commented 1 year ago

Greetings, I am having the same issue, also Windows 10. I've tried the examples above with the same error - no module named 'data_set_plates'

TVLAAU commented 1 year ago

Hello, I have the same issue, on windows 10. I've also tried the example above.

I have written this in VScode:

from compas_wood.joinery import joints import data_set_plates from compas_wood.viewer_helpers import display

def test_joints(): input = data_set_plates.ss_24() element_pair_lists, joint_areas_polylines, joint_types = joints(input, 0) display(input, joint_areas_polylines, None, 0.01, 0, 0, 0, False, joint_types)

test_joints()

I installed it as the "README.md" file describes, but I get this message: I then get this error: import data_set_plates ModuleNotFoundError: No module named 'data_set_plates'.

Furthermore, this message is present: PS C:\Users\aaulab\Documents\Programmering\EDX\Advanced_timber_plate_design\Lecture_4\compas_wood\compas_wood-main> C:/Users/aaulab/anaconda3/Scripts/activate PS C:\Users\aaulab\Documents\Programmering\EDX\Advanced_timber_plate_design\Lecture_4\compas_wood\compas_wood-main> conda activate wood-mooc conda : The term 'conda' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

where in the video the Interpreter is set to: Python 3.8.12 ('wood-mooc') 〜.conda3\envs\wood-mooc\python.exe

the Anaconda Prompt has worked fine until now.

Kind regards, Thomas

KY2292 commented 1 year ago

Hello @petrasvestartas , I pulled the latest version and tried your example for Annen structure but it did not work. It worked only when I copied the module data_set_plates.py from the folder C:\compas_wood\tests to the folder C:\compas_wood\docs\examples, in which we created example_2.py to work on. Kindly clarify if this is a correct procedure. Best regards, Karim

petrasvestartas commented 7 months ago

The repository has been refactored.

You can try again with the following:


Conda

git clone https://github.com/petrasvestartas/compas_wood.git
conda create -n compas_wood_3_9_10 python=3.9.10 compas
conda activate compas_wood_3_9_10
pip install -r requirements.txt
pip install -e .

Geometry is displayed using compas_viewer. Please clone the viewer to have the latest version install in the current environment:¨

git clone https://github.com/compas-dev/compas_viewer.git
cd compas_viewer
conda activate compas_wood_3_9_10
pip install -e .
TVLAAU commented 7 months ago

Hi again,

I have no idea of what I’m doing wrong. Is it possible for you to make a video tutorial or something of how to download the software? I tried from scratch recreating the repository, but I now get this message:

@.***

I have made sure, that the directory is linked to the specific folder. I used gitBash to clone the repository and I followed your commands by copying them.

Is there any other way to obtain the software? Could it be made as user friendly as all the other plugins for Grasshopper?

I have no idea in which direction to head from here.


Med venlig hilsen / Kind Regards

I Thomas Vang Lindberg I Cand. Polyt. Arch I

I Research Assistant I Aalborg University I I Department of Architecture, Design and Media Technology I I Member of Create Integrated Architecture research group I I @.**@.> I LinkedInhttps://www.linkedin.com/in/thomasvanglindberg/ I

I Rendsburggade 14, 9000 Aalborg, Denmark, 6.337 I I Web: https://vbn.aau.dk/da/persons/155119 I tlf: +45 9940 8781 I

[emailsignatur-UK-logo]

Fra: Petras Vestartas @.> Sendt: 22. april 2024 09:54 Til: petrasvestartas/compas_wood @.> Cc: Thomas Vang Lindberg @.>; Comment @.> Emne: Re: [petrasvestartas/compas_wood] ModuleNotFoundError: No module named 'data_set_plates' (Issue #7)

The repository has been refactored.

You can try again with the following:

Conda

git clone https://github.com/petrasvestartas/compas_wood.git

conda create -n compas_wood_3_9_10 python=3.9.10 compas

conda activate compas_wood_3_9_10

pip install -r requirements.txt

pip install -e .

Geometry is displayed using compas_viewer. Please clone the viewer to have the latest version install in the current environment:¨

git clone https://github.com/compas-dev/compas_viewer.git

cd compas_viewer

conda activate compas_wood_3_9_10

pip install -e .

— Reply to this email directly, view it on GitHubhttps://github.com/petrasvestartas/compas_wood/issues/7#issuecomment-2068727803, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BBSFPHNRC5QRCGKTB6X22M3Y6S6Z5AVCNFSM6AAAAAAZ3UHTBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRYG4ZDOOBQGM. You are receiving this because you commented.Message ID: @.***>

petrasvestartas commented 7 months ago

Step by step. Provide screenshot what are you doing because what you pasted does not say anything.

  1. Download Anaconda Prompt: https://docs.anaconda.com/free/anaconda/install/windows/
  2. Download Visual Studio code https://code.visualstudio.com/
  3. Go to a folder e.g. in my case: C:/brg/2_code/ where you will download the package, open Anaconda prompt and type these bash commands:
git clone https://github.com/petrasvestartas/compas_wood.git
cd compas_wood
conda create -n compas_wood_3_9_10 python=3.9.10 compas
conda activate compas_wood_3_9_10

You should see something similar on windows:

Screenshot from 2024-04-22 11-54-40

pip install -r requirements.txt
pip install -e .

If one of them fails make a screenshot.

This is a testing for the new version. Before getting into Grasshopper and other things, I prefer first to see if this works...

TVLAAU commented 7 months ago

Hi

I think it went through this time!

  1. Download Anaconda Prompt: https://docs.anaconda.com/free/anaconda/install/windows/
  2. Download Visual Studio code https://code.visualstudio.com/
  3. Go to a folder where you will download the package, open Anaconda prompt and type these bash commands:

git clone https://github.com/petrasvestartas/compas_wood.git

@.***

cd compas_wood

@.***

conda create -n compas_wood_3_9_10 python=3.9.10 compas

@.***

@.***

@.***

@.***

conda activate compas_wood_3_9_10

@.***

pip install -r requirements.txt

@.***

pip install -e . @.***

So now I will do the same for compas_viewer. To check if everything works.


Med venlig hilsen / Kind Regards

I Thomas Vang Lindberg I Cand. Polyt. Arch I

I Research Assistant I Aalborg University I I Department of Architecture, Design and Media Technology I I Member of Create Integrated Architecture research group I I @.**@.> I LinkedInhttps://www.linkedin.com/in/thomasvanglindberg/ I

I Rendsburggade 14, 9000 Aalborg, Denmark, 6.337 I I Web: https://vbn.aau.dk/da/persons/155119 I tlf: +45 9940 8781 I

[emailsignatur-UK-logo]

Fra: Petras Vestartas @.> Sendt: 22. april 2024 11:53 Til: petrasvestartas/compas_wood @.> Cc: Thomas Vang Lindberg @.>; Comment @.> Emne: Re: [petrasvestartas/compas_wood] ModuleNotFoundError: No module named 'data_set_plates' (Issue #7)

Step by step. Provide screenshot what are you doing because what you pasted does not say anything.

  1. Download Anaconda Prompt: https://docs.anaconda.com/free/anaconda/install/windows/
  2. Download Visual Studio code https://code.visualstudio.com/
  3. Go to a folder where you will download the package, open Anaconda prompt and type these bash commands:

git clone https://github.com/petrasvestartas/compas_wood.git

cd compas_wood

conda create -n compas_wood_3_9_10 python=3.9.10 compas

conda activate compas_wood_3_9_10

pip install -r requirements.txt

pip install -e .

If one of them fails make a screenshot.

This is a testing for the new version. Before getting into Grasshopper and other things, I prefer first to see if this works...

— Reply to this email directly, view it on GitHubhttps://github.com/petrasvestartas/compas_wood/issues/7#issuecomment-2068970408, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BBSFPHLPY2ZQWBVXXLERBHDY6TMZDAVCNFSM6AAAAAAZ3UHTBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRYHE3TANBQHA. You are receiving this because you commented.Message ID: @.***>

TVLAAU commented 7 months ago

Hi again,

Update on Compas viewer:

git clone https://github.com/compas-dev/compas_viewer.git @.***

cd compas_viewer @.***

conda activate compas_wood_3_9_10

@.***

pip install -e . @.***

@.***

Now both Compas_Wood and Compas_viewer are installed, and I hope it’s correct.

I will move further with your installation description.

Thanks for the help.


Med venlig hilsen / Kind Regards

I Thomas Vang Lindberg I Cand. Polyt. Arch I

I Research Assistant I Aalborg University I I Department of Architecture, Design and Media Technology I I Member of Create Integrated Architecture research group I I @.**@.> I LinkedInhttps://www.linkedin.com/in/thomasvanglindberg/ I

I Rendsburggade 14, 9000 Aalborg, Denmark, 6.337 I I Web: https://vbn.aau.dk/da/persons/155119 I tlf: +45 9940 8781 I

[emailsignatur-UK-logo]

Fra: Thomas Vang Lindberg Sendt: 22. april 2024 12:44 Til: petrasvestartas/compas_wood @.>; petrasvestartas/compas_wood @.> Cc: Comment @.***> Emne: SV: [petrasvestartas/compas_wood] ModuleNotFoundError: No module named 'data_set_plates' (Issue #7)

Hi

I think it went through this time!

  1. Download Anaconda Prompt: https://docs.anaconda.com/free/anaconda/install/windows/
  2. Download Visual Studio code https://code.visualstudio.com/
  3. Go to a folder where you will download the package, open Anaconda prompt and type these bash commands:

git clone https://github.com/petrasvestartas/compas_wood.git

@.***

cd compas_wood

@.***

conda create -n compas_wood_3_9_10 python=3.9.10 compas

@.***

@.***

@.***

@.***

conda activate compas_wood_3_9_10

@.***

pip install -r requirements.txt

@.***

pip install -e . @.***

So now I will do the same for compas_viewer. To check if everything works.


Med venlig hilsen / Kind Regards

I Thomas Vang Lindberg I Cand. Polyt. Arch I

I Research Assistant I Aalborg University I I Department of Architecture, Design and Media Technology I I Member of Create Integrated Architecture research group I I @.**@.> I LinkedInhttps://www.linkedin.com/in/thomasvanglindberg/ I

I Rendsburggade 14, 9000 Aalborg, Denmark, 6.337 I I Web: https://vbn.aau.dk/da/persons/155119 I tlf: +45 9940 8781 I

[emailsignatur-UK-logo]

Fra: Petras Vestartas @.**@.>> Sendt: 22. april 2024 11:53 Til: petrasvestartas/compas_wood @.**@.>> Cc: Thomas Vang Lindberg @.**@.>>; Comment @.**@.>> Emne: Re: [petrasvestartas/compas_wood] ModuleNotFoundError: No module named 'data_set_plates' (Issue #7)

Step by step. Provide screenshot what are you doing because what you pasted does not say anything.

  1. Download Anaconda Prompt: https://docs.anaconda.com/free/anaconda/install/windows/
  2. Download Visual Studio code https://code.visualstudio.com/
  3. Go to a folder where you will download the package, open Anaconda prompt and type these bash commands:

git clone https://github.com/petrasvestartas/compas_wood.git

cd compas_wood

conda create -n compas_wood_3_9_10 python=3.9.10 compas

conda activate compas_wood_3_9_10

pip install -r requirements.txt

pip install -e .

If one of them fails make a screenshot.

This is a testing for the new version. Before getting into Grasshopper and other things, I prefer first to see if this works...

— Reply to this email directly, view it on GitHubhttps://github.com/petrasvestartas/compas_wood/issues/7#issuecomment-2068970408, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BBSFPHLPY2ZQWBVXXLERBHDY6TMZDAVCNFSM6AAAAAAZ3UHTBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRYHE3TANBQHA. You are receiving this because you commented.Message ID: @.**@.>>

petrasvestartas commented 7 months ago

I do not know what you are copying but ***@***.***, impossible to understand.

In github comment you can drag and drop an image:

RKu7x

Next open VSCode and press Ctrl+Shift+P, select python interpreter: image

image

Click on the environment you created and then Terminal->new terminal. Under docs/examples there are python files: image

Open the file, right click->Run Python->Run Python File in Terminal, you should see something like this: image

Full video: Screencast from 22.04.2024 13:38:54.webm

petrasvestartas commented 7 months ago

@TVLAAU

Tutorial page is made for you: https://petrasvestartas.github.io/compas_wood/latest/installation/conda.html