Comments (12)
Hi @superficialt ,
thanks for your feedback. I didnt have the chance to test the package on Mac, a friend wanted to do that, but didnt find the time. So i cant reproduce it at the moment :(.
I made an update to the code. Could you re-install the latest (dev) version from github and see if there comes an error message- If that doesnt help - could you check if there was a file created in the same directory as your notebook file is?
If that doesnt help i will try to get my hands on a mac.
Best regards,
Tonio
from imageclipr.
Thanks for the input. I've updated the package, and restarted R. It seems to be more broken now I'm afraid. I get an error message now before the code clip (in my image above) appears:
Error in value[[3L]](cond) : Error copying the file with python. Error message reads: Error in py_run_string_impl(code, local, convert): Evaluation error: option error has NULL value. In addition: Warning messages: 1: replacing previous import ‘shiny::runExample’ by ‘shinyjs::runExample’ when loading ‘imageclipr’ 2: In if ("AttributeError: 'NoneType' object has no attribute 'save'" == : the condition has length > 1 and only the first element will be used
from imageclipr.
Not more broken, more detailed logging :) The python code seems to fail. Checking the error leads to: rstudio/reticulate#494.
So it could be a bug in rstudio.
Could you have a look at it and check if the error occurs if you work outside a project or update rstudio to the referenced version?
from imageclipr.
any update @superficialt ?
from imageclipr.
from imageclipr.
I meant you could check: rstudio/reticulate#494. There they write about the same error message.
--> Action would be:
- test code outside an rstudio project in case you are using one
- update rstudio to the version mentioned in rstudio/reticulate#494
from imageclipr.
I think I found the error for Mac OSX.
It looks like that the filePath from the rstudioapi is throwing a path name that has tilda (~) as the home directory. And whenever that path is given to the python code, it fails.
from imageclipr.
I created a pull request (although, I think due to this Windows Mac OSX differences in line breaks it shows a entire code changes) that fixes the issue and works with Mac OSX. (It is just one additional line, which I believe will not affect Windows usage).
from imageclipr.
OK, forgive my ignorance but how do I update to your version?
from imageclipr.
Thanks for the PR @chlee-tabin. You are right on the "diff" he showed me -168 + 170 lines of code, but thats fine. I merged the PR, thanks for the OSX support!
@superficialt. You can update now, by downloading the current version.
from imageclipr.
@TiMaG Hi thanks again for the wonderful package which I am using it. I created one more pull request which I am happy if you decline, but I think it makes sense of naming the png files alongside the markdown file (I have multiple markdown files in a directory so makes it easier to pinpoint which images I pasted).
from imageclipr.
Sure, thanks for your contribution!!
from imageclipr.
Related Issues (9)
- Image does not show up HOT 1
- Shortcut key HOT 1
- Clipboard data is not an image HOT 2
- Changes to the `imageclipr::config` are not permanent HOT 1
- Error in (function () : Please save the file before pasting an image. HOT 3
- Error in (function () : Please save the file before pasting an image. HOT 2
- Error : (converted from warning) unable to re-encode 'insertImageCode.R' line 26 HOT 2
- Organize images into subdirectory by default
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imageclipr.