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

Gen room command does not work #53

Open
koepferl opened this issue Feb 16, 2024 · 35 comments
Open

Gen room command does not work #53

koepferl opened this issue Feb 16, 2024 · 35 comments

Comments

@koepferl
Copy link

I am currently working through this tutorial.

https://lbnl-eta.github.io/frads/how-to/guide_rad1/

gen room 12 14 3
-w 0.4 1 2.5 1.8
-w 3.3 1 2.5 1.8
-w 6.2 1 2.5 1.8
-w 9.1 1 2.5 1.8
-t 0.1 -n aroom

does not work. It returns me the following error:

gen room 12 14 3 \
-w 0.4 1 2.5 1.8
-w 3.3 1 2.5 1.8
-w 6.2 1 2.5 1.8
-w 9.1 1 2.5 1.8 \
-t 0.1 -n aroom
usage: gen room [-h] [-w start_x start_z width height] [-n NAME] [-t Facade thickness] [-r ROTATE] width depth flrflr flrclg
gen room: error: the following arguments are required: flrclg

Just to be sure, I currently have version:

In [1]: import frads

In [2]: print(frads.version)
0.2.10

However the installation of the below did not quite work, because a file was missing:

pip install git+https://github.com/taoning/pyenergyplus_wheels
Collecting git+https://github.com/taoning/pyenergyplus_wheels
Cloning https://github.com/taoning/pyenergyplus_wheels to /private/var/folders/c2/tthc2_6j741c3rvx9vpjppwh0000gn/T/pip-req-build-ihxnqfnq
Running command git clone --filter=blob:none --quiet https://github.com/taoning/pyenergyplus_wheels /private/var/folders/c2/tthc2_6j741c3rvx9vpjppwh0000gn/T/pip-req-build-ihxnqfnq
Resolved https://github.com/taoning/pyenergyplus_wheels to commit 664456bc5428ad50ace2c2bc729bbc486afa0435
Preparing metadata (setup.py) ... done
Collecting pyenergyplus@ https://github.com/taoning/pyenergyplus/raw/main/wheels/darwin/pyenergyplus-23.1.0-py3-none-macosx_10_13_x86_64.whl
ERROR: HTTP error 404 while getting https://github.com/taoning/pyenergyplus/raw/main/wheels/darwin/pyenergyplus-23.1.0-py3-none-macosx_10_13_x86_64.whl
ERROR: Could not install requirement pyenergyplus@ https://github.com/taoning/pyenergyplus/raw/main/wheels/darwin/pyenergyplus-23.1.0-py3-none-macosx_10_13_x86_64.whl from https://github.com/taoning/pyenergyplus/raw/main/wheels/darwin/pyenergyplus-23.1.0-py3-none-macosx_10_13_x86_64.whl (from pyenergyplus-wheels==0.1.0) because of HTTP error 404 Client Error: Not Found for url: https://github.com/taoning/pyenergyplus/raw/main/wheels/darwin/pyenergyplus-23.1.0-py3-none-macosx_10_13_x86_64.whl for URL https://github.com/taoning/pyenergyplus/raw/main/wheels/darwin/pyenergyplus-23.1.0-py3-none-macosx_10_13_x86_64.whl

Desktop (please complete the following information):

  • OS: [MacOS]
  • Browser [Safari]
@taoning
Copy link
Collaborator

taoning commented Feb 20, 2024

It looks like the installation didn't pick up the latest frads. Yours is at 0.2.10, and the latest is 1.2.4.
Can you post your entire installation log>

@koepferl
Copy link
Author

@taoning unfortunately this one is gone

@taoning
Copy link
Collaborator

taoning commented Feb 20, 2024

You can do a pip install --force-reinstall frads==1.2.4

@koepferl
Copy link
Author

Did not quite work, there are a few errors at the end.

(base) ..@... test_frads % pip install --force-reinstall frads==1.2.4
Collecting frads==1.2.4
Using cached frads-1.2.4-py3-none-any.whl (71 kB)
Collecting pyradiance>=0.3.0
Using cached pyradiance-0.3.0-py3-none-macosx_10_13_x86_64.whl (4.1 MB)
Collecting epmodel>=0.6.0
Using cached epmodel-0.6.0-py3-none-any.whl (58 kB)
Collecting pyenergyplus-lbnl>=23.2.0
Using cached pyenergyplus_lbnl-23.2.0-py3-none-macosx_10_13_x86_64.whl (39.7 MB)
Collecting numpy>=1.24.4
Downloading numpy-1.26.4-cp39-cp39-macosx_10_9_x86_64.whl (20.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 20.6/20.6 MB 3.5 MB/s eta 0:00:00
Collecting scipy>=1.10.1
Using cached scipy-1.12.0-cp39-cp39-macosx_10_9_x86_64.whl (38.9 MB)
ERROR: Could not find a version that satisfies the requirement pywincalc>=3.1.0 (from frads) (from versions: 2.3.4, 2.4.2, 2.4.3)
ERROR: No matching distribution found for pywincalc>=3.1.0

@koepferl
Copy link
Author

This is what I get from version:

In [1]: import frads

In [2]: print(frads.version)

AttributeError Traceback (most recent call last)
in
----> 1 print(frads.version)

AttributeError: module 'frads' has no attribute 'version'

In [3]: frads.version_check
Out[3]: 'RADIANCE 6.0a 2024-02-11 LBNL (6.0.3bdfad8502)\n'

@taoning
Copy link
Collaborator

taoning commented Feb 20, 2024

Thanks, this helps.
Looks like pip is installing the wrong version for some reason. You have M1 Mac and pip install is installing the intel version. I have never seen this before so I can only guess what's going on. What's your python version? Are you running x86 Python through RosettaStone on your M1 Mac? If you are using Anaconda, is it possible that you downloaded the one for Intel Mac and not M1 Mac?

@koepferl
Copy link
Author

@ taoning: Hi thank you. I have anaconda an I downloaded it, and did not install it via the command line. There is just one version there. Python 3.9.13

@taoning
Copy link
Collaborator

taoning commented Feb 22, 2024

Can you try this in your python

>>> import platform
>>> platform.processor()

@koepferl
Copy link
Author

In [1]: import platform

In [2]: platform.processor()
Out[2]: 'i386'

@taoning
Copy link
Collaborator

taoning commented Feb 23, 2024

You should see 'arm', not 'i386', if you are using m1 mac.
This indicates that you are running python through Rosetta, which is causing all the issues.
I suggest remove all python and re-install the correct version for you m1 mac.

@koepferl
Copy link
Author

How it is this one:

In [1]: import platform

In [2]: platform.processor()
Out[2]: 'arm'

@koepferl
Copy link
Author

% python --version
Python 3.11.5

@koepferl
Copy link
Author

What steps do you suggest next.

@taoning
Copy link
Collaborator

taoning commented Feb 23, 2024

Let's try to reinstall frads again with pip install --force-reinstall frads==1.2.4

@koepferl
Copy link
Author

It gives me this error:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tables 3.8.0 requires blosc2~=2.0.0, which is not installed.
tables 3.8.0 requires cython>=0.29.21, which is not installed.
spyder 5.4.3 requires pyqt5<5.16, which is not installed.
spyder 5.4.3 requires pyqtwebengine<5.16, which is not installed.
gensim 4.3.0 requires FuzzyTM>=0.4.0, which is not installed.
numba 0.57.1 requires numpy<1.25,>=1.21, but you have numpy 1.26.4 which is incompatible.
python-lsp-black 1.2.1 requires black>=22.3.0, but you have black 0.0 which is incompatible.
anaconda-cloud-auth 0.1.3 requires pydantic<2.0, but you have pydantic 2.6.2 which is incompatible.
Successfully installed annotated-types-0.6.0 deprecation-2.1.0 epmodel-0.6.0 frads-1.2.4 numpy-1.26.4 packaging-23.2 pydantic-2.6.2 pydantic-core-2.16.3 pyenergyplus-lbnl-23.2.1 pyradiance-0.3.1 pywincalc-3.3.1 scipy-1.12.0 typing-extensions-4.9.0

@koepferl
Copy link
Author

this does not work anymore

In [1]: import frads

In [2]: print(frads.version)

AttributeError Traceback (most recent call last)
Cell In[2], line 1
----> 1 print(frads.version)

AttributeError: module 'frads' has no attribute 'version'

In [3]: frads.version_check

AttributeError Traceback (most recent call last)
Cell In[3], line 1
----> 1 frads.version_check

AttributeError: module 'frads' has no attribute 'version_check'

@koepferl
Copy link
Author

Thanks for your help

@taoning
Copy link
Collaborator

taoning commented Feb 24, 2024 via email

@koepferl
Copy link
Author

koepferl commented Feb 24, 2024

It seems to be 1.2.4

Ok, how am unsure that everything works now. Is there some test I can use? I guess the one with the gen room is not ready yet.

@taoning
Copy link
Collaborator

taoning commented Feb 26, 2024

It's ready now, make sure you upgrade frads to 1.2.5 pip install -U frads

@koepferl
Copy link
Author

Hi, where did you put the update https://lbnl-eta.github.io/frads/how-to/guide_rad1/ is still the old version -- I think -- no windows in the display etc. a few typos in fr.gen_perez_sky and utils is not imported

@taoning
Copy link
Collaborator

taoning commented Feb 26, 2024

Should be fixed now.

@koepferl
Copy link
Author

koepferl commented Feb 26, 2024

Unfortunately I still see no windows. Also how would you plot the output "results" in matplotlib? But it runs through now

@koepferl
Copy link
Author

koepferl commented Feb 26, 2024

Screenshot 2024-02-26 at 22 35 50

@koepferl
Copy link
Author

(base) greif@maccmg test_rtace % gen room 12 14 4 3
-w 0.4 1 2.5 1.8
-w 3.3 1 2.5 1.8
-w 6.2 1 2.5 1.8
-w 9.1 1 2.5 1.8
-t 0.1 -n aroom
(base) greif@maccmg test_rtace % ls Objects
ceiling_aroom.rad materials_aroom.mat window_00_aroom.rad window_02_aroom.rad
floor_aroom.rad wall_aroom.rad window_01_aroom.rad window_03_aroom.rad
(base) greif@maccmg test_rtace % objview Objects/*aroom.mat Objects/*aroom.rad
oconv -f Objects/materials_aroom.mat Objects/ceiling_aroom.rad Objects/floor_aroom.rad Objects/wall_aroom.rad Objects/window_00_aroom.rad Objects/window_01_aroom.rad Objects/window_02_aroom.rad Objects/window_03_aroom.rad /var/folders/c2/tthc2_6j741c3rvx9vpjppwh0000gn/T/zJAgd_Y9l3/lt810.rad > /var/folders/c2/tthc2_6j741c3rvx9vpjppwh0000gn/T/zJAgd_Y9l3/ov810.oct
rvu -vtv -vp 34 35 30 -vd -14 -14 -14 -vu 0 0 1 -vh 45 -vv 45 -dp 128 -ar 16 -ds 0 -dt .2 -dc .25 -dr 0 -ss 0 -st .5 -af /var/folders/c2/tthc2_6j741c3rvx9vpjppwh0000gn/T/zJAgd_Y9l3/af810.amb -aa .3 -ad 256 -as 0 -av 0.36 0.36 0.36 -lr 6 -lw .001 -ps 8 -pt .16 -R /var/folders/c2/tthc2_6j741c3rvx9vpjppwh0000gn/T/zJAgd_Y9l3/ov810.rif -o x11 -pe .5 /var/folders/c2/tthc2_6j741c3rvx9vpjppwh0000gn/T/zJAgd_Y9l3/ov810.oct
X connection to /private/tmp/com.apple.launchd.sQWl7ebJoa/org.xquartz:0 broken (explicit kill or server shutdown).
rad: error running rvu

@taoning
Copy link
Collaborator

taoning commented Feb 26, 2024

you can do p 180 in objview to rotate 180° to see the windows. You are looking at the north side.
See the end of this guide for more info on plotting.

@koepferl
Copy link
Author

not quite sure about the plotting though. I get an output as a string

@taoning
Copy link
Collaborator

taoning commented Feb 26, 2024

You'd have to convert string to list of the floats, then use matplotlib to plot it as a scatter plots.

@koepferl
Copy link
Author

I give it a try. This typo ist still in, as the below it should work.

floor_primitives = fr.utils.unpack_primitives("Objects/floor_aroom.rad")

@koepferl
Copy link
Author

I only have on layer of results. It is 1-d

@koepferl
Copy link
Author

Screenshot 2024-02-26 at 23 17 12 Not sure this makes sense

@taoning
Copy link
Collaborator

taoning commented Feb 27, 2024

I give it a try. This typo ist still in, as the below it should work.

floor_primitives = fr.utils.unpack_primitives("Objects/floor_aroom.rad")

You should be able to use fr.unpack_primitives() what's the error you are seeing?

@taoning
Copy link
Collaborator

taoning commented Feb 27, 2024

Screenshot 2024-02-26 at 23 17 12 Not sure this makes sense

we will add something at the end of the tutorial.

@koepferl
Copy link
Author

should be able to use fr.unpack_primitives() what's the error you are seeing?

This works, but in the tutorial is an "s" missing. This is why I came up with the change.

@koepferl
Copy link
Author

Sorry I can not see the image you sent.

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

No branches or pull requests

2 participants