after installing magnus-ui in expo app getting error "No Space between hexadecimal literal and identifier" - react-native

expo go giving me this error
No Space between hexadecimal literal and identifier
No Stack

I am facing same problem here but it just happen in Android, iOS is running with no problem
-- EDIT --
I just found the problem when I tried to run the project on browser.
So these are the steps for you reproduce my aproach:
Run:
expo start
Choose "Run in web browser"
You will face a error in "color" module:
Access the module directory and file:
node_modules/color/index.js
1st problem is in line 66:
change this:
object &= 0xFF_FF_FF;
to this:
object &= 0xFFFFFF;
2nd problem is in the line 258:
change this:
`lum[i] = (chan <= 0.039_28) ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;``
to this:
lum[i] = (chan <= 0.03928) ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;
So this solved my problem just creating a issue here:
https://github.com/Qix-/color/
-- UPDATE --
The right way to fix that is downgrade color plugin from 4.0.0 to latest release, in my case today (07/28) is 3.2.1 so run:
yarn remove color
yarn add color#3.2.1

Related

Error in parse(text = x, srcfile = src): <text>:13:6: unexpected symbol 12: 13: This R ^

I am trying to create and run a simple .Rmd (RMarkdown file) on Kaggle.
When I create a new RMarkdown on Kaggle, when I click 'Run All' to run the Rmd code, I see:
Your Kernel is now running in the cloud.
Enter some code at the bottom of this console and press [Enter].
Session is starting...
Session started.
ERROR
Error in parse(text = x, srcfile = src): <text>:13:6: unexpected symbol 12: 13: This R ^
How can I successfully run a sample RMarkdown on Kaggle?
Notes
Similar problem outlined 10 days ago here.
The comment isn't helpful (it's just a shortcut instead of pressing the 'Run All' button)
Problem also seems to be mentioned 2 days ago here
Reproducible example
When creating a new RMarkdown on Kaggle, I do the following.
From the kaggle.com homepage, click on 'Code' on the left hand side, then on 'New Notebook':
When I do this, it is immediately clear that the interpreter doesn't lint the code correctly (look at the colours):
For reference, the language is 'RMarkdown':
And the editor type is 'Script':
And when I click 'Run All':
Click 'Save Version' (top right of screen)
That will run (i.e. 'knit') your RMarkdown code (it may take a moment). A link to the knitted document pop up in the bottom left of screen. It's that easy!

I am not getting the value of 'steps' from this React Native code

{this.state.isEnded ? 'Congrats! You have completed in $ {this.state.steps} steps.': 'You have tried $ {this.state.steps} time(s).'}
What is wrong?
React-native android development
{this.state.isEnded ? <Text>Congrats! You have completed in {this.state.steps} steps.</Text>:<Text>You have tried {this.state.steps} time(s).</Text>}
{this.state.isEnded ? <>Congrats! You have completed in ${this.state.steps} steps.<>: <>You have tried ${this.state.steps} time(s).<>}
replace <> with blank

Errors in October CMS installation via cPanel

I just installed October CMS on my hosting platform via cPanel's Softaculous utility. I do not believe installation method has anything to do with my errors but mentioning it just in case I am wrong.
October CMS Version: 1.0.458
Sever PHP Version: 7.3.3
After installing in the designated directory it is showing "HTTP 500" generic error so I checked the error log. Following error was being shown
"[28-Sep-2019 11:09:04 Etc/GMT] PHP Parse error: syntax error, unexpected '[', expecting ')' in /home/XYZ/public_html/XYZ/vendor/october/rain/src/Support/helpers.php on line 149"
There is absolutely no online resource which describes occurance of such an error and possible solution. So I opened the helper.php to look at line 149. The code on this line was,
$query = str_replace(['%', '?'], ['%%', '%s'], $query);
Now there is nothing seemingly wrong with this line but I thought may be the "str_replace" function is not able to understand the array arguments. So I removed the array arguments and wrote it two times like
$query = str_replace('%', '%%', $query);
$query = str_replace('?', '%s', $query);
Now the error on this line disappears but a new error appears on another line as follows
PHP Parse error: syntax error, unexpected '[' in /home/XYZ/public_html/XYZ/vendor/october/rain/src/Support/helpers.php on line 238
The code on this line is
function trans($id = null, $parameters = [], $domain = 'messages', $locale = null)
Now here I am not sure if removing brackets would make everything alright. Why should such strange errors appears? Can someone help?
Are you 100% sure the PHP version you're using is 7.3.3?
The short array syntax of using [ ... ] instead of array( ... ) was introduced in PHP 5.4 and the errors you are getting are the errors that will happen if you are using an older version of PHP. I'm not sure how cPanel Softaculous works, but perhaps somehow it set you up to use a different version of PHP then you expect.
I would try running phpinfo() to double check your PHP setup.

Getting Error with Pytube: signature = cipher.get_signature(js, stream['s']) KeyError: 's'

I have been this error when running my Pytube script:
signature = cipher.get_signature(js, stream['s'])
KeyError: 's'
My code is like this:
url = 'https://www.youtube.com/watch?v='
train_List = []
i = 0
while i < len(my_list):
if len(my_list[i]) > 6:
urls = url + my_list[i]
train_List.append(urls)
yt=YouTube(train_List[i])
t=yt.streams.filter(only_audio=True).all()
t[0].download('/pathtofolder')
i+=1
I also tried:
t=yt.streams.filter(file_extension='mp4').all()
I altered the cipher.py and helper.py files per the recommendation here: https://github.com/nficano/pytube/issues/353#issuecomment-455116197
but it hasn't fixed the problem. After making the alterations, I got the error noted above.
Next, I ran "pip install pytube --upgrade" per some other recommendations. Still getting the KeyError after it downloads a few audio files.
I've also implemented this in mixins.py, per the github issues:
if ('signature=' in url) or ('&sig=' in url) or ('&lsig=' in url):
but now it's hanging after 3 uploads.
Does anyone have a fix for this?
I fixed this issue (for me, at least) by changing line 49 in mixins.py to this:
signature = cipher.get_signature(js, stream['url'])
instead of
signature = cipher.get_signature(js, stream['s'])
and then changing lines 55-63 to
logger.debug(
'finished descrambling signature for itag=%s\n%s',
stream['itag'], pprint.pformat(
{
'url': stream['url'],
'signature': signature,
}, indent=2,
),
)
Have the same problem. If I try a second time it works most of the time...
url = 'https://www.youtube.com/watch?v=gQrkvZeE3Uc'
yt = YouTube(url)
yt.streams.filter(progressive=True, subtype='mp4').order_by('resolution').desc().last().download()
Thanks for any help
You have to fix the cipher.py file in lib/python3.6/site-packages/pytube:
In cipher.py, change pattern starting at line 38 to this:
pattern = [
r'(["\'])signature\1\s*,\s*(?P<sig>[a-zA-Z0-9$]+)\(',
r'\.sig\|\|(?P<sig>[a-zA-Z0-9$]+)\(',
r'yt\.akamaized\.net/\)\s*\|\|\s*.*?\s*c\s*&&\s*d\.set\([^,]+\s*,\s*(?:encodeURIComponent\s*\()?(?P<sig>[a-zA-Z0-9$]+)\(',
r'\bc\s*&&\s*d\.set\([^,]+\s*,\s*(?:encodeURIComponent\s*\()?\s*(?P<sig>[a-zA-Z0-9$]+)\(',
r'\bc\s*&&\s*d\.set\([^,]+\s*,\s*\([^)]*\)\s*\(\s*(?P<sig>[a-zA-Z0-9$]+)\(',
]
One of the ways to solve it: pip install git+https://github.com/nficano/pytube.git
Other than that, check this thread
I did pip uninstall pytube.
Checked my python version with python --version, turned out to be the Anaconda 3.6.8 version.
So I did pip3 install pytube, pip3 being for Python 3 I believe.
It works no problems now.
had same issue, based on other answers that installed it from sources, just checked my current pytube version, which was 9.5.0 and see that the last released is 9.5.2, so I just run pip install --upgrade pytube and worked perfectly

Karate Version 0.9.0.RC5 is not not running project developed in version 0.8.0.1

Getting Error:
13:59:17.372 [GatlingSystem-akka.actor.default-dispatcher-7] INFO com.intuit.karate - >> lock acquired, begin callonce: read('CLASSPATH:CreateUsers.feature');
13:59:17.372 [GatlingSystem-akka.actor.default-dispatcher-7] ERROR com.intuit.karate.FileUtils - feature relative path resolution failed: Illegal char <:> at index 9: CL
I tried replacing ":" by "=" but it didn't work for me
have you tried it as classpath:, It is case sensitive.
callonce read('classpath:CreateUsers.feature')