SAEL-SWFSC / SAEL-lab-manual

Lab manual for Southwest Acoustic Ecology Lab (SWFSC, NOAA Fisheries)
https://sael-swfsc.github.io/SAEL-lab-manual/
Creative Commons Zero v1.0 Universal
0 stars 1 forks source link

Unable to render multiple times #1

Closed asimonis closed 1 year ago

asimonis commented 1 year ago

I'm working on the SharedValues-BestPractices.qmd and after the first time I render the page I am unable to render it again. A pop-up box appears with the following error: "Error in utils::download.file(paste0("http://localhost:",port,"/quarto-render/"), : cannot open URL 'http://localhost:3928/quarto-render/'

TaikiSan21 commented 1 year ago

Can you see if this issue also happens with an RMD document? Would be good to know if this is Quarto-specific or something wonky with html rendering in general

shannonrankin commented 1 year ago

If you truncate the error, you will get other searches (some of these may be helpful). Topics I've seen raised include: version, path issues. I've also found many quarto questions related to rendering errors on StackOverflow (might be best to only use few keywords, such as quarto render or quarto error). Google Search results

asimonis commented 1 year ago

Changing it to an RMD document does not resolve the problem.

When I first hit the "Render" button, I'm able to see the doc in the viewer however when I look at the rendering process in the "Background Jobs" it seems to get hung up after "Watching files for changes, Browse at http://localhost:7889/content/SharedValues-BestPractices.html".

The rendering process has been running for > 2hours and hasn't finished.

shannonrankin commented 1 year ago

I see that you have a page up now-- is this resolved? If so, please describe how it was fixed and close this Issue. If not-- perhaps you can send me your qmd file separately, and I'll see if I can modify it on my end? (see if it is related to your computer or paths).

asimonis commented 1 year ago

The issue is not resolved yet. I am able to render the 'Shared Values & Best Practices" page, however the rendering process seems to continue indefinitely in the background jobs on RStudio, preventing any additional rendering. I pushed my current qmd file yesterday if you want to try to test it on your end.

TaikiSan21 commented 1 year ago

I think this may be the solution, I think you just have to stop the background job manually. I had the same issue when rendering your qmd document, but manually stopping the background process let me render again.

asimonis commented 1 year ago

Yes - manually stopping the background jobs works for now. I'm left wondering why this is an issue with my qmd doc and not others?

TaikiSan21 commented 1 year ago

Looks like it happens with every QMD file, I would guess its an issue with the "Render" button (vs. rmd files use "Knit"), not your file in particular.

shannonrankin commented 1 year ago

I posted in our Openscapes slack-- and I tagged Eli Holmes. I suspect she will provide an answer to why this is happening. Hope to have a better understanding next week!

shannonrankin commented 1 year ago

Here is a response from Eli Holmes.... Step 1. Go to Tools > Project Options > Build tools and make sure the drop down says none not website. So should look like so image (11) Step 2. Go to Tools > Global Options > R Markdown options and make sure output preview is to Viewer Pane . So like so image (12) Step 3. Restart the RStudio project by going to top right corner, and selecting your project in the dropdown. This is the easiest way to reload a project.

Fingers crossed that works. I have into this problem a bit myself and it is alway slightly a mystery why it is happening

asimonis commented 1 year ago

When I first open the QMD file, 'Tools > Project Options' is grayed out. I'm not familiar with how to work with R Projects. Perhaps there's something I need to adjust there?

TaikiSan21 commented 1 year ago

Do you remember if you created a project when you first set up Rstudio to work with this Github repo? Does the top right of your RStudio session show the name of something here or does it say (None) ? image

asimonis commented 1 year ago

It says "none". I have never used RProjects and I don't have Rstudio synched with the Github repo On Tue, Nov 1, 2022 at 10:53 AM Taiki Sakai @.***> wrote:

Do you remember if you created a project when you first set up Rstudio to work with this Github repo? Does the top right of your RStudio session show the name of something here or does it say (None) ? [image: image] https://user-images.githubusercontent.com/13296556/199303678-2c39f9e7-e2b2-401d-9a05-1d9e58a62402.png

— Reply to this email directly, view it on GitHub https://github.com/SAEL-SWFSC/SAEL-lab-manual/issues/1#issuecomment-1298898168, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBM562JVULSJILFUTN7EDDWGFKK5ANCNFSM6AAAAAARQJ6QLI . You are receiving this because you authored the thread.Message ID: @.***>

--

Anne Simonis (she/her https://www.mypronouns.org/she-her)

Acoustic Ecologist

Contractor with Ocean Associates in support of NOAA Fisheries

We are ADRIFT in the California Current. Check out our Sound Bytes blog https://www.fisheries.noaa.gov/taxonomy/term/1000356091 here.

‪(619) 786-3578‬

www.fisheries.noaa.gov

shannonrankin commented 1 year ago

Anne-- I think you will find it much easier to work with this through github studio and importing the projects into Rstudio. The methods are outlined on this page in our lab manual https://sael-swfsc.github.io/SAEL-lab-manual/content/Getting-Started.html. It makes it nice & easy to switch between projects and have them synced with github to commit/push (based on our conversation last week, it is probably easiest to push/pull using github desktop). Holler if you need help with this....

asimonis commented 1 year ago

I started an RProject, used the setting suggested by Eli, and the Background Jobs runs indefinitely after a QMD file is rendered. I'm going to rely on manually stopping the background jobs for now. Seems like it might just be a quarto bug.

happy to close the issue now unless you want to dig deeper

shannonrankin commented 1 year ago

The only other thing I can think of is that in her tutorial (link at the bottom, here), Eli mentions that sometimes people have annoying problems if they start a project in R/RStudio and then link it up to Github. She says there are fewer issues if you start from Github, then use Github desktop to clone a project, etc (following the steps in the link below, in the order they are presented). Otherwise, hopefully it will not lead to any actual problems (since they did render). So, feel free to close this issue. We can re-open again if needed. Fun with technology!